From 92c6da7b210d760693d2f36c457ea96eeaf8d7a2 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 1 Oct 2023 02:12:42 +0100 Subject: 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 --- include/boot.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'include') 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 # SPDX-FileCopyrightText: 2023 Leah Rowe -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 -- cgit v1.2.1