Fix the for loop syntax

This commit is contained in:
Bradlee Speice 2012-07-25 09:09:20 -04:00
parent 0cb20fd48f
commit 005aa3a284

View File

@ -166,7 +166,8 @@ click_i ()
OLD_TIMEOUT=$TIMEOUT OLD_TIMEOUT=$TIMEOUT
TIMEOUT=1 TIMEOUT=1
for loop in {1..$OLD_TIMEOUT} #I don't like this syntax, but 'for loop in {1..$OLD_TIMEOUT}' doesn't work
for loop in `seq 1 $OLD_TIMEOUT`
do do
for x in $@ for x in $@
do do
@ -188,8 +189,7 @@ click_i ()
done done
#We'll get here if we don't find a match #We'll get here if we don't find a match
OLD_TIMEOUT=$TIMEOUT TIMEOUT=$OLD_TIMEOUT
TIMEOUT=1
else else
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s 'i${center}mouseclick $x' >> $OUTFILE" eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s 'i${center}mouseclick $x' >> $OUTFILE"
CVA_RETURN=$? CVA_RETURN=$?
@ -352,9 +352,9 @@ hover_i ()
OLD_TIMEOUT=$TIMEOUT OLD_TIMEOUT=$TIMEOUT
TIMEOUT=1 TIMEOUT=1
for loop in {1..$OLD_TIMEOUT} #I don't like this syntax, but 'for loop in {1..$OLD_TIMEOUT}' doesn't work
for loop in `seq 1 $OLD_TIMEOUT`
do do
for x in $@ for x in $@
do do
waitfor "$x" waitfor "$x"
@ -373,6 +373,9 @@ hover_i ()
fi fi
done done
done done
#We'll get here if we didn't find a match
TIMEOUT=$OLD_TIMEOUT
else else
eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s '${center}mouseimage $x' >> $OUTFILE" eval "$CVAINPUT $TOLERANCE_OPTION $TOLERANCE --search-method $SEARCH_METHOD -s '${center}mouseimage $x' >> $OUTFILE"
CVA_RETURN=$? CVA_RETURN=$?