init.sh: move non-init functions to lib.sh

these were missed in a previous cleanup

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-04 08:33:17 +01:00
parent 7acec7a3a1
commit 7392f6fc8e
2 changed files with 16 additions and 16 deletions
-16
View File
@@ -51,22 +51,6 @@ xbmkpkg()
printf "You need AUR packages: %s\n" "$aur_notice" 1>&2; :
}
setcfg()
{
[ $# -gt 1 ] && printf "e \"%s\" f missing && return %s;\n" "$1" "$2"
[ $# -gt 1 ] || \
printf "e \"%s\" f not && %s \"Missing config\";\n" "$1" "$err"
printf ". \"%s\" || %s \"Could not read config\";\n" "$1" "$err"
}
chkvars()
{
for var in "$@"; do
eval "[ -n \"\${$var+x}\" ] || \$err \"$var unset\""
eval "[ -n \"\$$var\" ] || \$err \"$var unset\""
done; :
}
xbmk_set_pyver()
{
pyv="import sys; print(sys.version_info[:])"
+16
View File
@@ -128,6 +128,22 @@ setvars()
printf "%s\n" "${_setvars% }"
}
setcfg()
{
[ $# -gt 1 ] && printf "e \"%s\" f missing && return %s;\n" "$1" "$2"
[ $# -gt 1 ] || \
printf "e \"%s\" f not && %s \"Missing config\";\n" "$1" "$err"
printf ". \"%s\" || %s \"Could not read config\";\n" "$1" "$err"
}
chkvars()
{
for var in "$@"; do
eval "[ -n \"\${$var+x}\" ] || \$err \"$var unset\""
eval "[ -n \"\$$var\" ] || \$err \"$var unset\""
done; :
}
fe_()
{
find_ex "x_" "$@"