update/release: use getops OPTARG correctly
Signed-off-by: Leah Rowe <leah@libreboot.org>btrfsvols
parent
b5db048089
commit
7cd84aec28
|
@ -21,15 +21,14 @@ cbfstool="cbutils/default/cbfstool"
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
vdir="release"
|
vdir="release"
|
||||||
while getopts d:m: option
|
while getopts d:m: option; do
|
||||||
do
|
[ -z "${OPTARG}" ] && err "Empty argument not allowed"
|
||||||
case "${1}" in
|
case "${option}" in
|
||||||
-d) vdir="${2}" ;;
|
d) vdir="${OPTARG}" ;;
|
||||||
-m) mode="${2}" ;;
|
m) mode="${OPTARG}" ;;
|
||||||
*) err "Invalid option" ;;
|
*) err "Invalid option" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
[ -z "${vdir}" ] && err "Empty directory names not allowed"
|
|
||||||
|
|
||||||
vdir="${vdir}/${version}"
|
vdir="${vdir}/${version}"
|
||||||
basename="${projectname}-${version}"
|
basename="${projectname}-${version}"
|
||||||
|
|
Loading…
Reference in New Issue