This commit is contained in:
pika 2025-05-11 13:17:22 +02:00
parent d8afacabf9
commit ae0b6646a0

View file

@ -1,3 +1,7 @@
# INFO:
# ╭──────────────────────────────╮
# │ User variables and functions │
# ╰──────────────────────────────╯
distro="" distro=""
ubuntu="false" ubuntu="false"
debian="false" debian="false"
@ -38,6 +42,17 @@ silentexec() {
"$@" >/dev/null 2>&1 "$@" >/dev/null 2>&1
} }
checkAndInstall() {
for deps in "$@"; do
if ! command_exists $deps; then
echo_note "$deps is not installed. Installing it now.."
_install "$deps"
else
echo_note "skipping $deps - as it's already installed.."
fi
done
}
# ─< Check if the user is root and set sudo variable if necessary >─────────────────────── # ─< Check if the user is root and set sudo variable if necessary >───────────────────────
check_root() { check_root() {
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then