summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-10-04 08:29:33 +0100
committerLeah Rowe <leah@libreboot.org>2025-10-04 08:29:33 +0100
commit63002732f50671f76b8a92eba417819dfd39aee3 (patch)
tree7a1888734a7e95fe6dbf244f1df327737b8fb5ab /include
parentb7a9aad9fc700ddc38f0ce89f52b8fe7aa2fe86a (diff)
tree.sh: rename _f to flag, for code clarity
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/tree.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/include/tree.sh b/include/tree.sh
index f5127a6e..46bf5dad 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -4,6 +4,9 @@
# Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
+# flag e.g. ./mk -b <-- mkflag would be "b"
+flag=""
+
xarch=""
srcdir=""
premake=""
@@ -18,7 +21,6 @@ target=""
target_dir=""
targets=""
xtree=""
-_f=""
release=""
bootstrapargs=""
mkhelper=""
@@ -53,16 +55,16 @@ trees()
while getopts $flags option
do
- if [ -n "$_f" ]; then
+ if [ -n "$flag" ]; then
err "only one flag is permitted" "trees" "$@"
fi
- _f="$1"
+ flag="$1"
# the "mode" variable is affixed to a make command, example:
# ./mk -m coreboot does: make menuconfig -C src/coreboot/tree
- case "$_f" in
+ case "$flag" in
-d)
# -d is similar to -b, except that
# a large number of operations will be
@@ -104,10 +106,10 @@ trees()
shift 2
done
- if [ -z "$_f" ]; then
+ if [ -z "$flag" ]; then
err "missing flag ($flags)" "trees" "$@"
elif [ -z "$project" ]; then
- fx_ "x_ ./mk $_f" x_ ls -1 config/git
+ fx_ "x_ ./mk $flag" x_ ls -1 config/git
return 1
@@ -222,9 +224,9 @@ handle_defconfig()
for y in "$target_dir/config"/*
do
- if [ "$_f" != "-d" ] && [ ! -f "$y" ]; then
+ if [ "$flag" != "-d" ] && [ ! -f "$y" ]; then
continue
- elif [ "$_f" != "-d" ]; then
+ elif [ "$flag" != "-d" ]; then
defconfig="$y"
fi
@@ -301,7 +303,7 @@ configure_project()
. "$_tcfg" || \
err "Can't read '$_tcfg'" "configure_project" "$@"
- if [ "$_f" = "-d" ]; then
+ if [ "$flag" = "-d" ]; then
build_depend="" # dry run
fi
if [ "$cmd" = "build_project" ]; then