wip
This commit is contained in:
parent
66dcdaf662
commit
4ea25f8c6b
1 changed files with 19 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue