From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
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 [thread overview]
Message-ID: <20180131210108.28048-1-laurent.pinchart@ideasonboard.com> (raw)
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 <laurent.pinchart@ideasonboard.com>
---
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)
--
Regards,
Laurent Pinchart
next reply other threads:[~2018-01-31 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 21:01 Laurent Pinchart [this message]
2018-01-31 23:09 ` [PATCH 1/2] gmsl-yavta: Remove bash-isms Niklas Söderlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180131210108.28048-1-laurent.pinchart@ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.