mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-04 19:25:43 +00:00
Make page processor print usage only after reporting all bad opts
This commit is contained in:
1 parent
7e1d20acdf
commit
12dc49b60a
1 file changed
+2
-4
@@ -26,14 +26,12 @@ while getopts ":hr" opt; do
|
||||
;;
|
||||
\?)
|
||||
echo "Unknown option '$OPTARG'"
|
||||
if [ $bad_usage -eq 0 ]; then
|
||||
usage
|
||||
bad_usage=1
|
||||
fi
|
||||
bad_usage=1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [ $bad_usage -ne 0 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
Reference in new issue
Block a user