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>
This commit is contained in:
Leah Rowe
2024-06-27 02:38:22 +01:00
parent f383b1ad70
commit 9154ba5b85
+1
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)"