mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 23:08:49 +02:00
init.sh: simplify dependencies handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+2
-5
@@ -26,10 +26,7 @@ xbmk_init()
|
|||||||
|
|
||||||
export PWD="$xbmkpwd"
|
export PWD="$xbmkpwd"
|
||||||
|
|
||||||
if [ $# -gt 0 ] && [ "$1" = "dependencies" ]; then
|
[ $# -gt 0 ] && [ "$1" = "dependencies" ] && x_ xbmkpkg "$@" && exit 0
|
||||||
install_packages "$@" || exit 1
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
id -u 1>/dev/null 2>/dev/null || $err "suid check failed (id -u)"
|
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"
|
[ "$(id -u)" != "0" ] || $err "this command as root is not permitted"
|
||||||
@@ -40,7 +37,7 @@ xbmk_init()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
install_packages()
|
xbmkpkg()
|
||||||
{
|
{
|
||||||
[ $# -lt 2 ] && $err "fewer than two arguments"
|
[ $# -lt 2 ] && $err "fewer than two arguments"
|
||||||
[ $# -gt 2 ] && reinstall="$3"
|
[ $# -gt 2 ] && reinstall="$3"
|
||||||
|
|||||||
Reference in New Issue
Block a user