summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-01 02:12:42 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-01 04:08:30 +0100
commit92c6da7b210d760693d2f36c457ea96eeaf8d7a2 (patch)
tree9949d89109809bf7c5566ca7512a9ebbcd74efd3 /include
parent2a6fcf7022d1ca3abc6f65438cf5bd93aac2a100 (diff)
build/boot/roms_helper: shorten variable names
also: further reduce the number of arguments passed, to certain functions as and when feasible, in cases where those are global variables that never change. the cbfstool argument in mkUbootRom wasn't even used. that function was only using the global variable, which again is only set once. i also shortened a few messages, removed a few errant line breaks and reduced sloccount by exactly 1 in main() by re-arranging how the shift command is used. it's mainly about shortening variable names, to then reduce the number of line breaks, but it's a surgical code size reduction in build/boot/roms. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rwxr-xr-xinclude/boot.sh22
1 files changed, 9 insertions, 13 deletions
diff --git a/include/boot.sh b/include/boot.sh
index 06648cb6..6685652d 100755
--- a/include/boot.sh
+++ b/include/boot.sh
@@ -3,7 +3,7 @@
# SPDX-FileCopyrightText: 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
-eval "$(setvars "" first board boards _displaymode _payload _keyboard_layout)"
+eval "$(setvars "" first board boards _displaymode _payload _keyboard)"
main()
{
@@ -16,21 +16,17 @@ main()
while [ $# -gt 0 ]; do
case ${1} in
- -d)
- _displaymode="${2}"
- shift ;;
- -p)
- _payload="${2}"
- shift ;;
- -k)
- _keyboard_layout="${2}"
- shift ;;
+ -d) _displaymode="${2}" ;;
+ -p) _payload="${2}" ;;
+ -k) _keyboard="${2}" ;;
all)
- first="all" ;;
+ first="all"
+ continue ;;
*)
- boards="${1} ${boards}" ;;
+ boards="${1} ${boards}"
+ continue ;;
esac
- shift
+ shift 2
done
handle_targets