From 0717ca6b84d531e258ffefc562cf97f1ea71f1c3 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Tue, 17 Sep 2024 06:33:25 -0400 Subject: [PATCH 1/2] Change apt-get's & use nala along with apt --- tabs/applications-setup/dwmtitus-setup.sh | 6 +++--- tabs/applications-setup/mybash-setup.sh | 2 +- tabs/applications-setup/neovim-setup.sh | 2 +- tabs/common-script.sh | 2 +- tabs/system-setup/1-compile-setup.sh | 2 +- tabs/system-setup/3-global-theme.sh | 16 ++++++++-------- tabs/system-setup/4-remove-snaps.sh | 2 +- tabs/system-setup/system-update.sh | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tabs/applications-setup/dwmtitus-setup.sh b/tabs/applications-setup/dwmtitus-setup.sh index acc56c0e7..c00bb95d7 100755 --- a/tabs/applications-setup/dwmtitus-setup.sh +++ b/tabs/applications-setup/dwmtitus-setup.sh @@ -15,7 +15,7 @@ setupDWM() { pacman) $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb ;; - apt-get|nala) + apt|nala) $ESCALATION_TOOL "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev ;; dnf) @@ -178,7 +178,7 @@ setupDisplayManager() { pacman) $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server ;; - apt-get|nala) + apt|nala) $ESCALATION_TOOL "$PACKAGER" install -y xorg xinit ;; dnf) @@ -206,7 +206,7 @@ setupDisplayManager() { pacman) $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm "$DM" ;; - apt-get|nala) + apt|nala) $ESCALATION_TOOL "$PACKAGER" install -y "$DM" ;; dnf) diff --git a/tabs/applications-setup/mybash-setup.sh b/tabs/applications-setup/mybash-setup.sh index 7bca14e2c..b08e179e1 100644 --- a/tabs/applications-setup/mybash-setup.sh +++ b/tabs/applications-setup/mybash-setup.sh @@ -19,7 +19,7 @@ installDepend() { pacman) $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig ;; - apt) + apt|nala) $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig ;; dnf) diff --git a/tabs/applications-setup/neovim-setup.sh b/tabs/applications-setup/neovim-setup.sh index 0d3a2578d..6c00747a6 100755 --- a/tabs/applications-setup/neovim-setup.sh +++ b/tabs/applications-setup/neovim-setup.sh @@ -19,7 +19,7 @@ setupNeovim() { pacman) $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck ;; - apt) + apt|nala) $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck ;; dnf) diff --git a/tabs/common-script.sh b/tabs/common-script.sh index aa4deae95..c0034505e 100644 --- a/tabs/common-script.sh +++ b/tabs/common-script.sh @@ -125,7 +125,7 @@ checkDistro() { checkEnv() { checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get nala dnf pacman zypper yum xbps-install nix-env' + checkPackageManager 'apt nala dnf pacman zypper yum xbps-install nix-env' checkCurrentDirectoryWritable checkSuperUser checkDistro diff --git a/tabs/system-setup/1-compile-setup.sh b/tabs/system-setup/1-compile-setup.sh index a9d21890d..738d9fe1a 100755 --- a/tabs/system-setup/1-compile-setup.sh +++ b/tabs/system-setup/1-compile-setup.sh @@ -17,7 +17,7 @@ installDepend() { fi $AUR_HELPER -S --needed --noconfirm "$DEPENDENCIES" ;; - apt-get|nala) + apt|nala) COMPILEDEPS='build-essential' $ESCALATION_TOOL "$PACKAGER" update $ESCALATION_TOOL dpkg --add-architecture i386 diff --git a/tabs/system-setup/3-global-theme.sh b/tabs/system-setup/3-global-theme.sh index c3e360da5..4506c2d42 100644 --- a/tabs/system-setup/3-global-theme.sh +++ b/tabs/system-setup/3-global-theme.sh @@ -5,20 +5,20 @@ install_theme_tools() { printf "%b\n" "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}\n" case $PACKAGER in - apt-get) - $ESCALATION_TOOL apt-get update - $ESCALATION_TOOL apt-get install -y qt6ct kvantum + apt|nala) + $ESCALATION_TOOL "${PACKAGER}" update + $ESCALATION_TOOL "${PACKAGER}" install -y qt6ct kvantum ;; zypper) - $ESCALATION_TOOL zypper refresh - $ESCALATION_TOOL zypper --non-interactive install qt6ct kvantum + $ESCALATION_TOOL "${PACKAGER}" refresh + $ESCALATION_TOOL "${PACKAGER}" --non-interactive install qt6ct kvantum ;; dnf) - $ESCALATION_TOOL dnf update - $ESCALATION_TOOL dnf install -y qt6ct kvantum + $ESCALATION_TOOL "${PACKAGER}" update + $ESCALATION_TOOL "${PACKAGER}" install -y qt6ct kvantum ;; pacman) - $ESCALATION_TOOL pacman -S --needed --noconfirm qt6ct kvantum + $ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm qt6ct kvantum ;; *) printf "%b\n" "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n" diff --git a/tabs/system-setup/4-remove-snaps.sh b/tabs/system-setup/4-remove-snaps.sh index f804aa5b8..926f0d8ac 100644 --- a/tabs/system-setup/4-remove-snaps.sh +++ b/tabs/system-setup/4-remove-snaps.sh @@ -7,7 +7,7 @@ removeSnaps() { pacman) $ESCALATION_TOOL ${PACKAGER} -Rns snapd ;; - apt-get|nala) + apt|nala) $ESCALATION_TOOL ${PACKAGER} autoremove --purge snapd if [ "$ID" = ubuntu ]; then $ESCALATION_TOOL apt-mark hold snapd diff --git a/tabs/system-setup/system-update.sh b/tabs/system-setup/system-update.sh index e6b32af6d..2821b2da2 100755 --- a/tabs/system-setup/system-update.sh +++ b/tabs/system-setup/system-update.sh @@ -25,10 +25,10 @@ fastUpdate() { fi ;; - apt-get|nala) - $ESCALATION_TOOL apt-get update + apt|nala) + $ESCALATION_TOOL "${PACKAGER}" update if ! command_exists nala; then - $ESCALATION_TOOL apt-get install -y nala || { printf "%b\n" "${YELLOW}Falling back to apt-get${RC}"; PACKAGER="apt-get"; } + $ESCALATION_TOOL apt install -y nala || { printf "%b\n" "${YELLOW}Falling back to apt${RC}"; PACKAGER="apt"; } fi if [ "${PACKAGER}" = "nala" ]; then @@ -63,7 +63,7 @@ fastUpdate() { updateSystem() { printf "%b\n" "${GREEN}Updating system${RC}" case ${PACKAGER} in - nala|apt-get) + apt|nala) $ESCALATION_TOOL "${PACKAGER}" update -y $ESCALATION_TOOL "${PACKAGER}" upgrade -y ;; From acfcea7975c2eb42012494109b41f97c5bd9b9c3 Mon Sep 17 00:00:00 2001 From: nnyyxxxx Date: Tue, 17 Sep 2024 06:39:15 -0400 Subject: [PATCH 2/2] Move packager variables to different PR --- tabs/system-setup/3-global-theme.sh | 14 +++++++------- tabs/system-setup/system-update.sh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tabs/system-setup/3-global-theme.sh b/tabs/system-setup/3-global-theme.sh index 4506c2d42..480bcb55e 100644 --- a/tabs/system-setup/3-global-theme.sh +++ b/tabs/system-setup/3-global-theme.sh @@ -6,19 +6,19 @@ install_theme_tools() { printf "%b\n" "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}\n" case $PACKAGER in apt|nala) - $ESCALATION_TOOL "${PACKAGER}" update - $ESCALATION_TOOL "${PACKAGER}" install -y qt6ct kvantum + $ESCALATION_TOOL apt update + $ESCALATION_TOOL apt install -y qt6ct kvantum ;; zypper) - $ESCALATION_TOOL "${PACKAGER}" refresh - $ESCALATION_TOOL "${PACKAGER}" --non-interactive install qt6ct kvantum + $ESCALATION_TOOL zypper refresh + $ESCALATION_TOOL zypper --non-interactive install qt6ct kvantum ;; dnf) - $ESCALATION_TOOL "${PACKAGER}" update - $ESCALATION_TOOL "${PACKAGER}" install -y qt6ct kvantum + $ESCALATION_TOOL dnf update + $ESCALATION_TOOL dnf install -y qt6ct kvantum ;; pacman) - $ESCALATION_TOOL "${PACKAGER}" -S --needed --noconfirm qt6ct kvantum + $ESCALATION_TOOL pacman -S --needed --noconfirm qt6ct kvantum ;; *) printf "%b\n" "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n" diff --git a/tabs/system-setup/system-update.sh b/tabs/system-setup/system-update.sh index 2821b2da2..8ef1a71cb 100755 --- a/tabs/system-setup/system-update.sh +++ b/tabs/system-setup/system-update.sh @@ -26,7 +26,7 @@ fastUpdate() { ;; apt|nala) - $ESCALATION_TOOL "${PACKAGER}" update + $ESCALATION_TOOL apt update if ! command_exists nala; then $ESCALATION_TOOL apt install -y nala || { printf "%b\n" "${YELLOW}Falling back to apt${RC}"; PACKAGER="apt"; } fi