mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Make page processor print usage only after reporting all bad opts
This commit is contained in:
6
.github/actions/get-pages.sh
vendored
6
.github/actions/get-pages.sh
vendored
@@ -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