init.sh: simplify dependencies handling

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-04 08:29:19 +01:00
parent 93ba36ae45
commit 7acec7a3a1
+2 -5
View File
@@ -26,10 +26,7 @@ xbmk_init()
export PWD="$xbmkpwd"
if [ $# -gt 0 ] && [ "$1" = "dependencies" ]; then
install_packages "$@" || exit 1
exit 0
fi
[ $# -gt 0 ] && [ "$1" = "dependencies" ] && x_ xbmkpkg "$@" && exit 0
id -u 1>/dev/null 2>/dev/null || $err "suid check failed (id -u)"
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
@@ -40,7 +37,7 @@ xbmk_init()
done
}
install_packages()
xbmkpkg()
{
[ $# -lt 2 ] && $err "fewer than two arguments"
[ $# -gt 2 ] && reinstall="$3"