summaryrefslogtreecommitdiff
path: root/lbmk
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-08-22 00:34:15 +0100
committerLeah Rowe <leah@libreboot.org>2023-08-22 00:34:15 +0100
commit04ee26726af5f09dc47efc95d853341201019f5a (patch)
tree68d385ed3cafcc6851d5839624f65ffc157c0b66 /lbmk
parent62f23123cb2a5ef594f405053d0b111c6e01de87 (diff)
also clean up the main scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'lbmk')
-rwxr-xr-xlbmk19
1 files changed, 5 insertions, 14 deletions
diff --git a/lbmk b/lbmk
index d6bac743..f759e461 100755
--- a/lbmk
+++ b/lbmk
@@ -31,23 +31,15 @@ option=""
main()
{
- if [ "${0##*/}" = "lbmk" ]; then
- die "Do not run the lbmk script directly!"
- elif [ $# -lt 1 ]; then
- die "Too few arguments. Try: ${0} help"
- fi
+ [ "${0##*/}" = "lbmk" ] && die "Don't run this script directly."
+ [ $# -lt 1 ] && die "Too few arguments. Try: ${0} help"
buildpath="./resources/scripts/${0##*/}"
mode="${1}"
./.gitcheck
- if [ "${mode}" = help ]; then
- usage $0
- exit 0
- elif [ $# -lt 2 ]; then
- usage $0
- exit 1
- fi
+ [ "${mode}" = "help" ] && usage ${0} && exit 0
+ [ $# -lt 2 ] && usage ${0} && exit 1
if [ "${mode}" = "dependencies" ]; then
install_dependencies $@ || die "Could not install dependencies"
exit 0
@@ -61,8 +53,7 @@ main()
case "${option}" in
list)
printf "Options for mode '%s':\n\n" ${mode}
- listoptions "${mode}"
- ;;
+ listoptions "${mode}" ;;
all)
for option in $(listoptions "${mode}"); do
"${buildpath}/${mode}/${option}" $@