build: reduce code to less than 80 chars per line

Signed-off-by: Leah Rowe <leah@libreboot.org>
fsdg20230625
Leah Rowe 2023-05-18 10:21:54 +01:00
parent a212a5bec8
commit 1a062bb628
1 changed files with 24 additions and 24 deletions

20
build
View File

@ -2,7 +2,7 @@
# generic build script, for building components (all of them)
#
# Copyright (C) 2014, 2015, 2020, 2021 Leah Rowe <info@minifree.org>
# Copyright (C) 2014,2015,2020,2021,2023 Leah Rowe <info@minifree.org>
# Copyright (C) 2015 Patrick "P. J." McDermott <pj@pehjota.net>
# Copyright (C) 2015, 2016 Klemens Nanni <contact@autoboot.org>
# Copyright (C) 2022, Caleb La Grange <thonkpeasant@protonmail.com>
@ -54,7 +54,7 @@ help() {
Example: ./build roms withgrub
Example: ./build clean all
Refer to the ${projectname} documentation for more information.
Refer to ${projectname} documentation for more info.
EOF
}
@ -64,7 +64,7 @@ die() {
}
if [ $# -lt 1 ]; then
die "Wrong number of arguments specified. See './build help'."
die "Wrong argument count. Run: ./build help"
fi
mode="${1}"
@ -82,7 +82,7 @@ if [ $# -gt 1 ]; then
case "${option}" in
list)
printf "Available options for mode '%s':\n\n" "${mode}"
printf "Options for mode '%s':\n\n" ${mode}
listoptions "${mode}"
;;
all)
@ -91,16 +91,16 @@ if [ $# -gt 1 ]; then
done
;;
*)
if [ -d "${build}"/"${mode}"/ ]; then
if [ ! -d "${build}"/"${mode}"/ ]; then
help
die "Invalid mode '${mode}'. Run: ./build help"
fi
if [ -f "${build}"/"${mode}"/"${option}" ]; then
"${build}"/"${mode}"/"${option}" $@
else
help
die "Invalid option for '${mode}'. See './build ${mode} list'."
fi
else
help
die "Invalid mode '${mode}'. See './build help'."
printf "Invalid option for '%s'." ${mode}
die "Run: ./build ${mode} list'."
fi
esac
else