Rework the try function to support multiple option arguments (starting with -)

This commit is contained in:
david parsons
2011-02-18 22:31:23 -08:00
parent 3c948d20bf
commit 450f5e5d80
+7 -4
View File
@@ -29,10 +29,13 @@ summary() {
try() {
unset FLAGS
case "$1" in
-*) FLAGS=$1
shift ;;
esac
while [ "$1" ]; do
case "$1" in
-*) FLAGS="$FLAGS $1"
shift ;;
*) break ;;
esac
done
testcase=`./echo -n " $1" '........................................................' | ./cols 50`
__tests=`expr $__tests + 1`