[PATCH 1/2] gmsl-yavta: Remove bash-isms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux