This commit is contained in:
pika 2025-04-06 21:06:47 +02:00
parent 66dcdaf662
commit 4ea25f8c6b

View file

@ -53,16 +53,18 @@ command_exists() {
}
# ─────────────────────────────────────< get packager >─────────────────────────────────────
# checkPkg() {
for pkg in apt-get dnf pacman apk zypper; do
if command_exists $pkg; then
printf "Using ${RED}${pkg}${NC} method.."
export pkger="$pkg"
checkPkg() {
pkger=""
for pkg in apt-get dnf pacman apk zypper; do
if command_exists $pkg; then
printf "Using ${RED}${pkg}${NC} method.."
pkger="$pkg"
break
fi
done
# }
# break
return 0
fi
done
}
# ─────────────────────────────────< check for root/sudo >───────────────────────────────
# checkRoot() {
@ -228,12 +230,14 @@ zypperBase() {
# ╰───────────╯
# envCheck() {
# checkRoot
# checkPkg
# checkRoot
# checkPkg
# }
install_base() {
# envCheck
if ! checkPkg; then
return 1
fi
echo_info "Installing base packages..."
case "$pkger" in
@ -258,7 +262,9 @@ install_base() {
}
optimize_os() {
# envCheck
if ! checkPkg; then
return 1
fi
echo_info "Running OS optimizations..."
case "$pkg" in