summaryrefslogtreecommitdiff
path: root/script/update/project
diff options
context:
space:
mode:
Diffstat (limited to 'script/update/project')
-rwxr-xr-xscript/update/project/release11
1 files changed, 5 insertions, 6 deletions
diff --git a/script/update/project/release b/script/update/project/release
index a20703ac..426db72a 100755
--- a/script/update/project/release
+++ b/script/update/project/release
@@ -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}"