Fix alpine bugs

This commit is contained in:
Jeevitha Kannan K S 2024-10-13 18:30:02 +05:30
parent 45a880ae9a
commit 73d05d6cfa
No known key found for this signature in database
GPG Key ID: 5904C34A2F7CE333
10 changed files with 25 additions and 13 deletions

View File

@ -30,7 +30,7 @@ installNeovim() {
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add neovim
"$ESCALATION_TOOL" "$PACKAGER" add neovim ripgrep fzf py3-virtualenv luarocks go shellcheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"

View File

@ -33,6 +33,11 @@ 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
;;
*)

View File

@ -21,9 +21,6 @@ installJitsi() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y jitsi-meet
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add jitsi-meet
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1

View File

@ -23,9 +23,6 @@ installSignal() {
"$ESCALATION_TOOL" "$PACKAGER" copr enable luminoso/Signal-Desktop
"$ESCALATION_TOOL" "$PACKAGER" install -y signal-desktop
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add signal-desktop
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1

View File

@ -47,8 +47,6 @@ installLinutil() {
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add build-base
"$ESCALATION_TOOL" sed -i '/community/s/^#//' /etc/apk/repositories
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" add rustup
rustup-init
. $HOME/.cargo/env

View File

@ -21,8 +21,6 @@ updateLinutil() {
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add build-base
"$ESCALATION_TOOL" sed -i '/community/s/^#//' /etc/apk/repositories
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" add rustup
rustup-init
;;

View File

@ -82,6 +82,12 @@ checkPackageManager() {
fi
done
## Enable apk community packages
if [ "$PACKAGER" = "apk" ] && grep -qE '^#.*community' /etc/apk/repositories; then
"$ESCALATION_TOOL" sed -i '/community/s/^#//' /etc/apk/repositories
"$ESCALATION_TOOL" "$PACKAGER" update
fi
if [ -z "$PACKAGER" ]; then
printf "%b\n" "${RED}Can't find a supported package manager${RC}"
exit 1

View File

@ -50,7 +50,8 @@ installDepend() {
"$ESCALATION_TOOL" "$PACKAGER" -n install $DEPENDENCIES
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}"
exit 1
;;
esac
}
@ -95,6 +96,8 @@ installAdditionalDepend() {
"$ESCALATION_TOOL" "$PACKAGER" -n install $DISTRO_DEPS
;;
*)
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}"
exit 1
;;
esac
}

View File

@ -18,6 +18,11 @@ install_theme_tools() {
"$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
;;
*)

View File

@ -1,6 +1,7 @@
#!/bin/sh -e
. ../common-script.sh
. ../common-service-script.sh
cleanup_system() {
printf "%b\n" "${YELLOW}Performing system cleanup...${RC}"
@ -39,7 +40,9 @@ common_cleanup() {
"$ESCALATION_TOOL" find /var/tmp -type f -atime +5 -delete
"$ESCALATION_TOOL" find /tmp -type f -atime +5 -delete
"$ESCALATION_TOOL" find /var/log -type f -name "*.log" -exec truncate -s 0 {} \;
if [ "$INIT_MANAGER" = "systemctl" ]; then
"$ESCALATION_TOOL" journalctl --vacuum-time=3d
fi
}
clean_data() {