mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
simplify getopts loops in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user