mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-26 22:09:03 +02:00
update/release: use getops OPTARG correctly
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -21,15 +21,14 @@ cbfstool="cbutils/default/cbfstool"
|
||||
main()
|
||||
{
|
||||
vdir="release"
|
||||
while getopts d:m: option
|
||||
do
|
||||
case "${1}" in
|
||||
-d) vdir="${2}" ;;
|
||||
-m) mode="${2}" ;;
|
||||
while getopts d:m: option; do
|
||||
[ -z "${OPTARG}" ] && err "Empty argument not allowed"
|
||||
case "${option}" in
|
||||
d) vdir="${OPTARG}" ;;
|
||||
m) mode="${OPTARG}" ;;
|
||||
*) err "Invalid option" ;;
|
||||
esac
|
||||
done
|
||||
[ -z "${vdir}" ] && err "Empty directory names not allowed"
|
||||
|
||||
vdir="${vdir}/${version}"
|
||||
basename="${projectname}-${version}"
|
||||
|
||||
Reference in New Issue
Block a user