automake-ng
[Top][All Lists]
Advanced

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

[Automake-NG] [FYI] [ng] tests: fix unportable $((...)) usage


From: Stefano Lattarini
Subject: [Automake-NG] [FYI] [ng] tests: fix unportable $((...)) usage
Date: Sat, 21 Jul 2012 13:20:38 +0200

* t/longline.sh: Use "$i", not bare "i", to reference the value of
the shell variable 'i' in a $((...)) expression.  Issue revealed by
a failure with dash 0.5.2.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/longline.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/longline.sh b/t/longline.sh
index 2536846..25acc67 100755
--- a/t/longline.sh
+++ b/t/longline.sh
@@ -22,7 +22,7 @@
 i=0
 while test $i -lt 30; do
   echo some_very_very_long_variable_content_$i
-  i=$((i + 1))
+  i=$(($i + 1))
 done > t
 
 { echo "DUMMY =" && sed 's/^/DUMMY +=/' t; } > Makefile.am
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]