Skip to content

Commit

Permalink
fix all shellcheck warnings + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevithakannan2 committed Nov 5, 2024
1 parent 5878f4d commit 2e1a2e4
Show file tree
Hide file tree
Showing 89 changed files with 880 additions and 909 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ installGithubDesktop() {
if ! command_exists github-desktop; then
printf "%b\n" "${YELLOW}Installing Github Desktop...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -fsSL https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | "$ESCALATION_TOOL" tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
printf "%b\n" 'deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main\n' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/shiftkey-packages.list > /dev/null
apt-get | nala)
curl -fsSL https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | "$ESCALATION_TOOL" tee /usr/share/keyrings/shiftkey-packages.gpg >/dev/null
printf "%b\n" 'deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main\n' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/shiftkey-packages.list >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y github-desktop
;;
zypper)
"$ESCALATION_TOOL" rpm --import https://rpm.packages.shiftkey.dev/gpg.key
printf "%b\n" '[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key\n' | "$ESCALATION_TOOL" tee /etc/zypp/repos.d/shiftkey-packages.repo > /dev/null
printf "%b\n" '[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key\n' | "$ESCALATION_TOOL" tee /etc/zypp/repos.d/shiftkey-packages.repo >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install github-desktop
;;
Expand All @@ -23,7 +23,7 @@ installGithubDesktop() {
;;
dnf)
"$ESCALATION_TOOL" rpm --import https://rpm.packages.shiftkey.dev/gpg.key
printf "%b\n" '[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key\n' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/shiftkey-packages.repo > /dev/null
printf "%b\n" '[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key\n' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/shiftkey-packages.repo >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" install -y github-desktop
;;
*)
Expand Down
4 changes: 2 additions & 2 deletions core/tabs/applications-setup/Developer-tools/meld-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ installMeld() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm meld
;;
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" -y install meld
;;
*)
Expand All @@ -24,4 +24,4 @@ installMeld() {

checkEnv
checkEscalationTool
installMeld
installMeld
38 changes: 19 additions & 19 deletions core/tabs/applications-setup/Developer-tools/neovim-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ cloneNeovim() {

installNeovim() {
if ! command_exists neovim ripgrep git fzf; then
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y ripgrep fd-find python3-venv luarocks golang-go shellcheck git
curl -sSLo /tmp/nvim.appimage https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x /tmp/nvim.appimage
"$ESCALATION_TOOL" mv /tmp/nvim.appimage /usr/local/bin/nvim
;;
dnf|zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
printf "%b\n" "${YELLOW}Installing Neovim...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git
;;
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y ripgrep fd-find python3-venv luarocks golang-go shellcheck git
curl -sSLo /tmp/nvim.appimage https://github.com/neovim/neovim/releases/latest/download/nvim.appimage
chmod u+x /tmp/nvim.appimage
"$ESCALATION_TOOL" mv /tmp/nvim.appimage /usr/local/bin/nvim
;;
dnf | zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
fi
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ installNgrok() {

checkEnv
checkEscalationTool
installNgrok
installNgrok
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ installSublime() {
if ! command_exists sublime; then
printf "%b\n" "${YELLOW}Installing Sublime...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | "$ESCALATION_TOOL" apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/sublime-text.list
"$ESCALATION_TOOL" "$PACKAGER" update
Expand Down
12 changes: 6 additions & 6 deletions core/tabs/applications-setup/Developer-tools/vscode-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ installVsCode() {
if ! command_exists code; then
printf "%b\n" "${YELLOW}Installing VS Code..${RC}."
case "$PACKAGER" in
apt-get|nala)
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
apt-get | nala)
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor >packages.microsoft.gpg
"$ESCALATION_TOOL" install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/vscode.list > /dev/null
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/vscode.list >/dev/null
rm -f packages.microsoft.gpg
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y apt-transport-https code
;;
zypper)
"$ESCALATION_TOOL" rpm --import https://packages.microsoft.com/keys/microsoft.asc
printf "%b\n" '[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc' | "$ESCALATION_TOOL" tee /etc/zypp/repos.d/vscode.repo > /dev/null
printf "%b\n" '[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc' | "$ESCALATION_TOOL" tee /etc/zypp/repos.d/vscode.repo >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install code
;;
Expand All @@ -25,7 +25,7 @@ installVsCode() {
;;
dnf)
"$ESCALATION_TOOL" rpm --import https://packages.microsoft.com/keys/microsoft.asc
printf "%b\n" '[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/vscode.repo > /dev/null
printf "%b\n" '[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/vscode.repo >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" install -y code
;;
*)
Expand All @@ -41,4 +41,4 @@ installVsCode() {
checkEnv
checkEscalationTool
checkAURHelper
installVsCode
installVsCode
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ installVsCodium() {
if ! command_exists codium; then
printf "%b\n" "${YELLOW}Installing VS Codium...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
curl -fsSL https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | gpg --dearmor | "$ESCALATION_TOOL" dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/vscodium.list
"$ESCALATION_TOOL" "$PACKAGER" update
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/alacritty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

installAlacritty() {
if ! command_exists alacritty; then
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
printf "%b\n" "${YELLOW}Installing Alacritty...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
Expand Down
12 changes: 6 additions & 6 deletions core/tabs/applications-setup/android-debloat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
. ../common-script.sh

install_adb() {
if ! command_exists adb ; then
if ! command_exists adb; then
printf "%b\n" "${YELLOW}Installing ADB...${RC}."
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y android-sdk-platform-tools
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm android-tools
;;
dnf|zypper)
dnf | zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y android-tools
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
printf "%b\n" "${RED}Unsupported package manager: ${PACKAGER}${RC}"
exit 1
;;
esac
Expand All @@ -34,9 +34,9 @@ install_universal_android_debloater() {
else
printf "%b\n" "${GREEN}Universal Android Debloater is already installed. Run 'uad' command to execute.${RC}"
fi
}
}

checkEnv
checkEscalationTool
install_adb
install_universal_android_debloater
install_universal_android_debloater
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/bottles-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ installBottles() {
checkEnv
checkEscalationTool
checkFlatpak
installBottles
installBottles
4 changes: 2 additions & 2 deletions core/tabs/applications-setup/browsers/brave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ installBrave() {
if ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/brave-browser-release.list
Expand Down Expand Up @@ -42,4 +42,4 @@ installBrave() {
checkEnv
checkEscalationTool
checkAURHelper
installBrave
installBrave
28 changes: 14 additions & 14 deletions core/tabs/applications-setup/browsers/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
. ../../common-script.sh

installChromium() {
if ! command_exists chromium; then
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm chromium
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
;;
esac
else
printf "%b\n" "${GREEN}Chromium Browser is already installed.${RC}"
fi
if ! command_exists chromium; then
printf "%b\n" "${YELLOW}Installing Chromium...${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm chromium
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
;;
esac
else
printf "%b\n" "${GREEN}Chromium Browser is already installed.${RC}"
fi
}

checkEnv
checkEscalationTool
installChromium
installChromium
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/browsers/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ installFirefox() {
if ! command_exists firefox; then
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
;;
zypper)
Expand Down
4 changes: 2 additions & 2 deletions core/tabs/applications-setup/browsers/google-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ installChrome() {
if ! command_exists google-chrome; then
printf "%b\n" "${YELLOW}Installing Google Chrome...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb
;;
Expand Down Expand Up @@ -36,4 +36,4 @@ installChrome() {
checkEnv
checkEscalationTool
checkAURHelper
installChrome
installChrome
10 changes: 5 additions & 5 deletions core/tabs/applications-setup/browsers/librewolf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ installLibreWolf() {
if ! command_exists librewolf; then
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates
distro=`if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q " $(lsb_release -sc) "; then lsb_release -sc; else echo focal; fi`
distro=$(if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q " $(lsb_release -sc) "; then lsb_release -sc; else echo focal; fi)
curl -fsSL https://deb.librewolf.net/keyring.gpg | "$ESCALATION_TOOL" gpg --dearmor -o /usr/share/keyrings/librewolf.gpg
echo "Types: deb
URIs: https://deb.librewolf.net
Suites: $distro
Components: main
Architectures: amd64
Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/librewolf.sources > /dev/null
Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/librewolf.sources >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y librewolf
;;
dnf)
curl -fsSL https://rpm.librewolf.net/librewolf-repo.repo | pkexec tee /etc/yum.repos.d/librewolf.repo > /dev/null
curl -fsSL https://rpm.librewolf.net/librewolf-repo.repo | pkexec tee /etc/yum.repos.d/librewolf.repo >/dev/null
"$ESCALATION_TOOL" "$PACKAGER" install -y librewolf
;;
zypper)
Expand All @@ -45,4 +45,4 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
checkEnv
checkEscalationTool
checkAURHelper
installLibreWolf
installLibreWolf
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/browsers/lynx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ installLynx() {

checkEnv
checkEscalationTool
installLynx
installLynx
6 changes: 3 additions & 3 deletions core/tabs/applications-setup/browsers/thorium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ installThrorium() {
if ! command_exists thorium-browser; then
printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list
"$ESCALATION_TOOL" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/thorium.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y thorium-browser
;;
zypper|dnf)
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
"$ESCALATION_TOOL" "$PACKAGER" install -y thorium-latest.rpm && rm thorium-latest.rpm
Expand All @@ -32,4 +32,4 @@ installThrorium() {
checkEnv
checkEscalationTool
checkAURHelper
installThrorium
installThrorium
2 changes: 1 addition & 1 deletion core/tabs/applications-setup/browsers/vivaldi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ installVivaldi() {
if ! command_exists vivaldi; then
printf "%b\n" "${YELLOW}Installing Vivaldi...${RC}"
case "$PACKAGER" in
apt-get|nala)
apt-get | nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor | sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg
"$ESCALATION_TOOL" echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" | sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list
Expand Down
4 changes: 2 additions & 2 deletions core/tabs/applications-setup/browsers/waterfox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ installWaterfox() {
printf "%b\n" "${YELLOW}Installing waterfox...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm waterfox-bin
"$AUR_HELPER" -S --needed --noconfirm waterfox-bin
;;
*)
. ../setup-flatpak.sh
. ../setup-flatpak.sh
flatpak install -y flathub net.waterfox.waterfox
;;
esac
Expand Down
Loading

0 comments on commit 2e1a2e4

Please sign in to comment.