trees: explicitly err if OPTARG is not set

we currently rely on -e to make this happen

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2
Leah Rowe 2024-06-27 02:38:22 +01:00 committed by Leah Rowe
parent 8dcfb8a585
commit e3179f435e
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ main()
-n) mode="nconfig" ;;
*) $err "invalid option '-$option'" ;;
esac
[ -n "${OPTARG+x}" ] || $err "OPTARG not set"
project="${OPTARG#src/}"; shift 2
done
[ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"