diff options
author | Leah Rowe <leah@libreboot.org> | 2023-09-26 01:34:10 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-09-26 01:35:15 +0100 |
commit | 67f4919ffefdc2a95af95e86cc01b998df292b4b (patch) | |
tree | b30b50166bdea39c27948120426f0795ae7e7f98 /script/handle/make/file | |
parent | 36b7f01a8a1bf2d31f3163d64a96aa49a98d0d62 (diff) |
simplify getopts loops in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/handle/make/file')
-rwxr-xr-x | script/handle/make/file | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/script/handle/make/file b/script/handle/make/file index 3d485ea2..0d0d6f3c 100755 --- a/script/handle/make/file +++ b/script/handle/make/file @@ -15,16 +15,11 @@ main() while getopts b:c: option do case "${1}" in - -b) - shift ;; - -c) - mode="distclean" - shift ;; - *) - err "Invalid option" ;; + -b) : ;; + -c) mode="distclean" ;; + *) err "Invalid option" ;; esac - project="${OPTARG}" - shift + shift; project="${OPTARG}"; shift done [ -z "${project}" ] && err "project name not specified" |