mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-19 21:20:31 +02:00
xbmk: remove setvars function
only one file used it. i've replaced its use with a simple awk call alongside eval. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-1
@@ -27,7 +27,8 @@ tmpromdir=""
|
||||
tree=""
|
||||
xchanged=""
|
||||
|
||||
eval "`setvars "" $checkvars`"
|
||||
eval "`printf "%s\n" "$checkvars" | \
|
||||
awk '{ for (i=1; i<=NF; i++) $i = $i "=;"; print }'`"
|
||||
|
||||
inject()
|
||||
{
|
||||
|
||||
@@ -85,23 +85,6 @@ e()
|
||||
printf "%s %s\n" "$1" "$es2" 1>&2
|
||||
}
|
||||
|
||||
setvars()
|
||||
{
|
||||
_setvars=""
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
val="$1"
|
||||
shift 1
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
printf "%s=\"%s\"\n" "$1" "$val"
|
||||
shift 1
|
||||
done
|
||||
}
|
||||
|
||||
# return 0 if project is single-tree, otherwise 1
|
||||
# e.g. coreboot is multi-tree, so 1
|
||||
singletree()
|
||||
|
||||
Reference in New Issue
Block a user