Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix every issue related to printf #596

Merged
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ installGithubDesktop() {
"$ESCALATION_TOOL" "$PACKAGER" install github-desktop
;;
*)
printf "%b\n" "${RED}Unsupported package manager. Please install Github Desktop manually.${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ installNeovim() {
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}" # The packages above were grabbed out of the original nvim-setup-script.
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand Down
5 changes: 3 additions & 2 deletions core/tabs/applications-setup/Developer-tools/sublime-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ installSublime() {
"$ESCALATION_TOOL" "$PACKAGER" install sublime-text
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
esac
nnyyxxxx marked this conversation as resolved.
Show resolved Hide resolved
else
printf "%b\n" "${GREEN}Sublime is already installed.${RC}"
fi
Expand Down
3 changes: 2 additions & 1 deletion core/tabs/applications-setup/Developer-tools/vscode-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ installVsCode() {
"$ESCALATION_TOOL" "$PACKAGER" install code
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ installVsCodium() {
printf "%b\n" "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | "$ESCALATION_TOOL" tee -a /etc/yum.repos.d/vscodium.repo
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand Down
20 changes: 11 additions & 9 deletions core/tabs/applications-setup/browser-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ install_chrome() {
"$ESCALATION_TOOL" "$PACKAGER" install -y google-chrome-stable
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
else
Expand All @@ -43,15 +43,14 @@ install_thorium() {
;;
zypper|dnf)
url=$(curl -s https://api.github.com/repos/Alex313031/Thorium/releases/latest | grep -oP '(?<=browser_download_url": ")[^"]*\.rpm')
echo $url && curl -L $url -o thorium-latest.rpm
echo "$url" && curl -L "$url" -o thorium-latest.rpm
"$ESCALATION_TOOL" rpm -i thorium-latest.rpm && rm thorium-latest.rpm
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm thorium-browser-bin
;;
*)
printf "%b\n" "${RED}Unsupported package manager. Please install Thorium manually.${RC}"
exit 1
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
else
Expand All @@ -76,7 +75,8 @@ install_firefox() {
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand Down Expand Up @@ -117,7 +117,7 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
;;
*)
printf "%b\n" "${RED}Unsupported package manager. Please install Librewolf manually.${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand Down Expand Up @@ -152,7 +152,8 @@ install_brave() {
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand Down Expand Up @@ -189,7 +190,8 @@ install_chromium() {
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand Down Expand Up @@ -227,7 +229,7 @@ browserSetup() {
printf "%b\n" "7. Thorium"
printf "%b\n" "8. Lynx"
printf "%b\n" "----------------------------"
printf "%b\n" "Enter your choices (e.g., 1 3 5): "
printf "%b" "Enter your choices (e.g., 1 3 5): "
nnyyxxxx marked this conversation as resolved.
Show resolved Hide resolved
read -r choice
for ch in $choice; do
case $ch in
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/dwmtitus-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ setupDWM() {
"$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh # no need to include git here as it should be already installed via "Development Tools"
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/linutil-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ installLinutil() {
;;
*)
printf "%b\n" "${RED}There are no official packages for your distro.${RC}"
printf "%b" "${YELLOW}Do you want to install the crates.io package? (y/N) ${RC}"
printf "%b" "${YELLOW}Do you want to install the crates.io package? (y/N): ${RC}"
read -r choice
case $choice in
y|Y)
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/mybash-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ installDepend() {
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}" # The packages above were grabbed out of the original mybash-setup-script.
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand Down
34 changes: 18 additions & 16 deletions core/tabs/applications-setup/office-suite-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ install_onlyoffice() {
"$AUR_HELPER" -S --needed --noconfirm onlyoffice
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand All @@ -30,20 +31,20 @@ install_libreoffice() {
printf "%b\n" "${YELLOW}Installing Libre Office...${RC}"
if ! command_exists libreoffice; then
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core
;;
zypper|dnf)
. ./setup-flatpak.sh
flatpak install -y flathub org.libreoffice.LibreOffice
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core
;;
zypper|dnf)
. ./setup-flatpak.sh
flatpak install -y flathub org.libreoffice.LibreOffice
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh
;;
*)
printf "%b\n" "${RED}Unsupported package manager. Please install Thorium manually.${RC}"
exit 1
;;
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Libre Office is already installed.${RC}"
Expand Down Expand Up @@ -88,7 +89,8 @@ install_freeoffice() {
"$ESCALATION_TOOL" "$PACKAGER" install -y softmaker-freeoffice-2024
;;
*)
printf "%b\n" "${RED}The script does not support your Distro. Install manually..${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
}
Expand Down Expand Up @@ -174,7 +176,7 @@ officeSuiteSetup() {
printf "%b\n" "7. PDF Studio Viewer"
printf "%b\n" "8. PDF Studio (Paid Software)"
printf "%b\n" "----------------------------"
printf "%b\n" "Enter your choices (e.g., 1 3 5): "
printf "%b" "Enter your choices (e.g., 1 3 5): "
read -r choice
for ch in $choice; do
case $ch in
Expand Down
8 changes: 4 additions & 4 deletions core/tabs/applications-setup/setup-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ setup_flatpak() {
"$ESCALATION_TOOL" "$PACKAGER" install -S flatpak
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand All @@ -50,7 +50,7 @@ setup_flatpak() {
else
if command -v flatpak >/dev/null 2>&1; then
if ! flatpak remotes | grep -q "flathub"; then
printf "%b\n" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (y/n)${RC}"
printf "%b" "${YELLOW}Detected Flatpak package manager but Flathub remote is not added. Would you like to add it? (y/N): ${RC}"
read -r add_remote
case "$add_remote" in
[Yy]*)
Expand All @@ -70,14 +70,14 @@ setup_flatpak() {
# Only used for Ubuntu GNOME. Ubuntu GNOME doesnt allow flathub to be added as a remote to their store.
# So in case the user wants to use a GUI siftware manager they can setup it here
if [ "$DE" = "GNOME" ]; then
printf "%b\n" "${YELLOW}Detected GNOME desktop environment. Would you like to install GNOME Software plugin for Flatpak? (y/n)${RC}"
printf "%b" "${YELLOW}Detected GNOME desktop environment. Would you like to install GNOME Software plugin for Flatpak? (y/N): ${RC}"
read -r install_gnome
if [ "$install_gnome" = "y" ] || [ "$install_gnome" = "Y" ]; then
"$ESCALATION_TOOL" "$PACKAGER" install -y gnome-software-plugin-flatpak
fi
# Useful for Debian KDE spin as well
elif [ "$DE" = "KDE" ]; then
printf "%b\n" "${YELLOW}Detected KDE desktop environment. Would you like to install KDE Plasma Discover backend for Flatpak? (y/n)${RC}"
printf "%b" "${YELLOW}Detected KDE desktop environment. Would you like to install KDE Plasma Discover backend for Flatpak? (y/N): ${RC}"
read -r install_kde
if [ "$install_kde" = "y" ] || [ "$install_kde" = "Y" ]; then
"$ESCALATION_TOOL" "$PACKAGER" install -y plasma-discover-backend-flatpak
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/zsh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RPROMPT='%F{15}(%F{166}%D{%H:%M}%F{15})%f'
EOL

# Ensure /etc/zsh/zshenv sets ZDOTDIR to the user's config directory
echo 'export ZDOTDIR="$HOME/.config/zsh"' | "$ESCALATION_TOOL" tee -a /etc/zsh/zshenv
echo "export ZDOTDIR=\"$HOME/.config/zsh\"" | "$ESCALATION_TOOL" tee -a /etc/zsh/zshenv
}

checkEnv
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/system-setup/arch/paru-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ installDepend() {
fi
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
}
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/system-setup/arch/yay-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ installDepend() {
fi
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
;;
esac
}
Expand Down
6 changes: 3 additions & 3 deletions core/tabs/system-setup/compile-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ installDepend() {
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" dpkg --add-architecture i386
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $COMPILEDEPS
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$COMPILEDEPS"
;;
dnf)
COMPILEDEPS='@development-tools'
Expand All @@ -34,11 +34,11 @@ installDepend() {
zypper)
COMPILEDEPS='patterns-devel-base-devel_basis'
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install "$DEPENDENCIES" $COMPILEDEPS
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install "$DEPENDENCIES" "$COMPILEDEPS"
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install libgcc_s1-gcc7-32bit glibc-devel-32bit
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES # Fixed bug where no packages found on debian-based
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES"
;;
esac
}
Expand Down
4 changes: 2 additions & 2 deletions core/tabs/system-setup/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ install_docker() {
"$ESCALATION_TOOL" systemctl start docker
;;
*)
printf "${RED}Unsupported package manager. Please install Docker manually.${RC}\n"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand All @@ -56,7 +56,7 @@ install_docker_compose() {
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm docker-compose
;;
*)
printf "${RED}Unsupported package manager. Please install Docker Compose manually.${RC}\n"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ installDriver() {

# NOTE: A confirmation option to proceed or not
userConfirmation() {
printf "%b" "${YELLOW}Do you want to continue? (Y/N): ${RC}"
printf "%b" "${YELLOW}Do you want to continue? (y/N): ${RC}"
read -r choice
case "$choice" in
y | Y)
Expand Down
16 changes: 8 additions & 8 deletions core/tabs/system-setup/global-theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../common-script.sh

install_theme_tools() {
printf "%b\n" "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}\n"
printf "%b\n" "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}"
case "$PACKAGER" in
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y qt6ct kvantum
Expand All @@ -18,30 +18,30 @@ install_theme_tools() {
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm qt6ct kvantum
;;
*)
printf "%b\n" "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n"
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
nnyyxxxx marked this conversation as resolved.
Show resolved Hide resolved
exit 1
;;
esac
}

configure_qt6ct() {
printf "%b\n" "${YELLOW}Configuring qt6ct...${RC}\n"
printf "%b\n" "${YELLOW}Configuring qt6ct...${RC}"
mkdir -p "$HOME/.config/qt6ct"
cat <<EOF > "$HOME/.config/qt6ct/qt6ct.conf"
[Appearance]
style=kvantum
color_scheme=default
icon_theme=breeze
EOF
printf "%b\n" "${GREEN}qt6ct configured successfully.${RC}\n"
printf "%b\n" "${GREEN}qt6ct configured successfully.${RC}"

# Add QT_QPA_PLATFORMTHEME to /etc/environment
if ! grep -q "QT_QPA_PLATFORMTHEME=qt6ct" /etc/environment; then
printf "%b\n" "${YELLOW}Adding QT_QPA_PLATFORMTHEME to /etc/environment...${RC}\n"
printf "%b\n" "${YELLOW}Adding QT_QPA_PLATFORMTHEME to /etc/environment...${RC}"
echo "QT_QPA_PLATFORMTHEME=qt6ct" | "$ESCALATION_TOOL" tee -a /etc/environment > /dev/null
printf "%b\n" "${GREEN}QT_QPA_PLATFORMTHEME added to /etc/environment.${RC}\n"
printf "%b\n" "${GREEN}QT_QPA_PLATFORMTHEME added to /etc/environment.${RC}"
else
printf "%b\n" "${GREEN}QT_QPA_PLATFORMTHEME already set in /etc/environment.${RC}\n"
printf "%b\n" "${GREEN}QT_QPA_PLATFORMTHEME already set in /etc/environment.${RC}"
fi
}

Expand All @@ -52,7 +52,7 @@ configure_kvantum() {
[General]
theme=Breeze
EOF
printf "%b\n" "${GREEN}Kvantum configured successfully.${RC}\n"
printf "%b\n" "${GREEN}Kvantum configured successfully.${RC}"
}

checkEnv
Expand Down
3 changes: 2 additions & 1 deletion core/tabs/system-setup/remove-snaps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ removeSnaps() {
"$ESCALATION_TOOL" "$PACKAGER" remove snapd
;;
*)
printf "%b\n" "${RED}Removing snapd not implemented for this package manager${RC}"
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
}
Expand Down
Loading