mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
Rework the try function to support multiple option arguments (starting with -)
This commit is contained in:
+7
-4
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user