chore: update scripts, add common-service-script to shellcheckrc

This commit is contained in:
JEEVITHA KANNAN K S 2024-11-03 19:33:18 +05:30
parent 6c7ded0061
commit 9ed6fd5635
No known key found for this signature in database
GPG Key ID: 5904C34A2F7CE333
10 changed files with 21 additions and 23 deletions

View File

@ -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

View File

@ -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)
@ -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}"

View File

@ -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

View File

@ -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)
@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -78,7 +78,6 @@ updateSystem() {
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive dup
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" upgrade
;;
*)

View File

@ -12,6 +12,7 @@ list_devices() {
printf "\n"
}
# shellcheck disable=SC2086
installDependencies() {
DEPENDENCIES="xz gzip bzip2 jq"
if ! command_exists ${DEPENDENCIES}; then
@ -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

View File

@ -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"