mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-18 04:22:15 +02:00
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:
@@ -51,22 +51,6 @@ xbmkpkg()
|
|||||||
printf "You need AUR packages: %s\n" "$aur_notice" 1>&2; :
|
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()
|
xbmk_set_pyver()
|
||||||
{
|
{
|
||||||
pyv="import sys; print(sys.version_info[:])"
|
pyv="import sys; print(sys.version_info[:])"
|
||||||
|
|||||||
@@ -128,6 +128,22 @@ setvars()
|
|||||||
printf "%s\n" "${_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_()
|
fe_()
|
||||||
{
|
{
|
||||||
find_ex "x_" "$@"
|
find_ex "x_" "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user