From dc265feb63c70a1a76fb566a6c05fe62246b65a0 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 26 May 2010 13:45:16 +0200 Subject: Fix bashims in configure and gcctestsuite.sh. configure and gcctestsuite.sh shell scripts contains bashisms although being bourne shell script. This patch fixes the following bashisms: * Use of $RANDOM variable (replaced by reading in /dev/urandom) * Use == in tests instead of just = * Use $[] for arithmetic computation istead of $(()) --- tests/gcctestsuite.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/gcctestsuite.sh') diff --git a/tests/gcctestsuite.sh b/tests/gcctestsuite.sh index bd9204b..f3cc538 100644 --- a/tests/gcctestsuite.sh +++ b/tests/gcctestsuite.sh @@ -8,11 +8,11 @@ nb_failed="0" for src in $TESTSUITE_PATH/compile/*.c ; do echo $TCC -o /tmp/test.o -c $src $TCC -o /tmp/test.o -c $src >> tcc.log 2>&1 - if [ "$?" == "0" ] ; then + if [ "$?" = "0" ] ; then result="PASS" else result="FAIL" - nb_failed=$[ $nb_failed + 1 ] + nb_failed=$(( $nb_failed + 1 )) fi echo "$result: $src" >> tcc.sum done @@ -20,11 +20,11 @@ done for src in $TESTSUITE_PATH/execute/*.c ; do echo $TCC $src $TCC $src >> tcc.log 2>&1 - if [ "$?" == "0" ] ; then + if [ "$?" = "0" ] ; then result="PASS" else result="FAIL" - nb_failed=$[ $nb_failed + 1 ] + nb_failed=$(( $nb_failed + 1 )) fi echo "$result: $src" >> tcc.sum done -- cgit v1.3.1