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