From patchwork Wed Jan 31 21:01:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10194805 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B4EF160380 for ; Wed, 31 Jan 2018 21:00:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2889287F5 for ; Wed, 31 Jan 2018 21:00:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A712228584; Wed, 31 Jan 2018 21:00:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34DD828584 for ; Wed, 31 Jan 2018 21:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752592AbeAaVA5 (ORCPT ); Wed, 31 Jan 2018 16:00:57 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:50422 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbeAaVAy (ORCPT ); Wed, 31 Jan 2018 16:00:54 -0500 Received: from localhost.localdomain (unknown [IPv6:2a02:a03f:52fb:2b00:ac86:2f77:64c9:83c0]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 3C8D920226; Wed, 31 Jan 2018 21:59:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1517432381; bh=/N2Lpb4BWCriuqZVQrM/jWZfmd4wr4lt5MFyzwAb9Zk=; h=From:To:Cc:Subject:Date:From; b=Em+SP8g092uTmoV9m9et+XJa0sQC4Pm93LV0vtZMM52j9jH4sECIqZ0NJygC87WYT kdHZGBwIJsd3y1pyZRjIk49pb159gtKG0rHkIw4AKfUjhvrOlmHZTqqUkRIHngRvHr tkNlxwGgf6FKT8e+vLQ70AKtoyU+G+XCPGtSD2+E= From: Laurent Pinchart To: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Cc: linux-renesas-soc@vger.kernel.org Subject: [PATCH 1/2] gmsl-yavta: Remove bash-isms Date: Wed, 31 Jan 2018 23:01:08 +0200 Message-Id: <20180131210108.28048-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.13.6 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The script contains two bash-specific constructs: - Replace ${!var} expansion with eval - Initialize conf1234 and conf5678 variables to avoid empty argument to -ne test Signed-off-by: Laurent Pinchart --- gmsl-yavta.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gmsl-yavta.sh b/gmsl-yavta.sh index 635ab72feb07..a123bf52a16d 100755 --- a/gmsl-yavta.sh +++ b/gmsl-yavta.sh @@ -22,13 +22,17 @@ function conf() { function capture() { VID="$1" + vid=$(eval echo \$$VID) - yavta -f YUYV -s 1280x800 -c10 --skip 7 --file="$out/$VID-#.bin" /dev/${!VID} & + yavta -f YUYV -s 1280x800 -c10 --skip 7 --file="$out/$VID-#.bin" /dev/$vid & } mc_reset # Need to configure all formats going through each MAX9286 +conf1234=0 +conf5678=0 + for cam in "$@"; do case $cam in 1|2|3|4)