Show the usage message when -p/--printresult is repeated.

This commit is contained in:
Username404-59 2021-02-26 21:50:53 +01:00
parent 36c1f17fc1
commit f5c8b6290e
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 8 additions and 2 deletions

View File

@ -17,6 +17,7 @@ usage() {
fi fi
} }
pUsed=false
args=""; args="";
run=false; run=false;
skipArgsIteration=false; skipArgsIteration=false;
@ -48,8 +49,13 @@ if [ "$#" != 0 ]; then
usage false usage false
exit 0 ;; exit 0 ;;
-p | --printresult ) -p | --printresult )
newArgs "$it" if [ $pUsed = false ]; then
shift ;; pUsed=true
newArgs "$it"
else
usage false
exit 0
fi ;;
*.ybcon ) *.ybcon )
newArgs "$it" newArgs "$it"
run=true run=true