Skip to content

Commit

Permalink
chore: update scripts, add common-service-script to shellcheckrc
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevithakannan2 committed Nov 3, 2024
1 parent 6c7ded0 commit 9ed6fd5
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 23 deletions.
3 changes: 2 additions & 1 deletion .shellcheckrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
external-sources=true
source=core/tabs/common-script.sh
source=core/tabs/common-script.sh
source=core/tabs/common-service-script.sh
10 changes: 3 additions & 7 deletions core/tabs/applications-setup/browsers/librewolf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installLibreWolf() {
if ! command_exists librewolf; then
if ! command_exists io.gitlab.librewolf-community && ! command_exists librewolf; then
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand Down Expand Up @@ -33,12 +33,8 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
;;
apk)
alpine_version=$(grep . /etc/alpine-release | cut -d . -f 2)
if [ "$alpine_version" -le 20 ]; then
printf "%b\n" "${RED}Only available in edge release of alpine linux${RC}"
exit 1
fi
"$ESCALATION_TOOL" "$PACKAGER" add librewolf
checkFlatpak
flatpak install flathub io.gitlab.librewolf-community
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
Expand Down
6 changes: 3 additions & 3 deletions core/tabs/applications-setup/browsers/waterfox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
. ../../common-script.sh

installWaterfox() {
if ! command_exists waterfox; then
if ! command_exists net.waterfox.waterfox && ! command_exists waterfox; then
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
checkFlatpak
flatpak install -y flathub net.waterfox.waterfox
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installJitsi() {
if ! command_exists jitsi-meet; then
if ! command_exists org.jitsi.jitsi-meet && ! command_exists jitsi-meet; then
printf "%b\n" "${YELLOW}Installing Jitsi meet...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand All @@ -21,6 +21,10 @@ installJitsi() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y jitsi-meet
;;
apk)
checkFlatpak
flatpak install flathub org.jitsi.jitsi-meet
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 2 additions & 1 deletion core/tabs/applications-setup/linutil-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ installLinutil() {
"$ESCALATION_TOOL" "$PACKAGER" add build-base
"$ESCALATION_TOOL" "$PACKAGER" add rustup
rustup-init
. $HOME/.cargo/env
# shellcheck disable=SC1091
. "$HOME/.cargo/env"
;;
*)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Expand Down
2 changes: 2 additions & 0 deletions core/tabs/applications-setup/linutil-updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ updateLinutil() {
"$ESCALATION_TOOL" "$PACKAGER" add build-base
"$ESCALATION_TOOL" "$PACKAGER" add rustup
rustup-init
# shellcheck disable=SC1091
. "$HOME/.cargo/env"
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y rustup
Expand Down
8 changes: 0 additions & 8 deletions core/tabs/system-setup/global-theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ install_theme_tools() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm qt6ct kvantum
;;
apk)
alpine_version=$(grep . /etc/alpine-release | cut -d . -f 2)
if [ "$alpine_version" -le 20 ]; then
printf "%b\n" "${RED}Only available in edge release of alpine linux${RC}"
exit 1
fi
"$ESCALATION_TOOL" "$PACKAGER" add qt6ct kvantum
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
1 change: 0 additions & 1 deletion core/tabs/system-setup/system-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ updateSystem() {
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive dup
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" upgrade
;;
*)
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/utils/create-bootable-usb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ list_devices() {
printf "\n"
}

# shellcheck disable=SC2086
installDependencies() {
DEPENDENCIES="xz gzip bzip2 jq"
if ! command_exists ${DEPENDENCIES}; then
Expand All @@ -23,6 +24,8 @@ installDependencies() {
"${ESCALATION_TOOL}" "${PACKAGER}" install -y ${DEPENDENCIES};;
pacman)
"${ESCALATION_TOOL}" "${PACKAGER}" -S --noconfirm --needed ${DEPENDENCIES};;
apk)
"${ESCALATION_TOOL}" "${PACKAGER}" add ${DEPENDENCIES};;
*)
printf "%b\n" "${RED}Unsupported package manager.${RC}"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion core/tabs/utils/samba-ssh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ install_package() {
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$PACKAGE"
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add $PACKAGE
"$ESCALATION_TOOL" "$PACKAGER" add "$PACKAGE"
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y "$PACKAGE"
Expand Down

0 comments on commit 9ed6fd5

Please sign in to comment.