mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-26 06:46:04 +00:00
Fix alpine bugs
This commit is contained in:
parent
45a880ae9a
commit
73d05d6cfa
|
@ -30,7 +30,7 @@ installNeovim() {
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
|
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
|
||||||
;;
|
;;
|
||||||
apk)
|
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}"
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||||
|
|
|
@ -33,6 +33,11 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
|
||||||
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
|
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
|
||||||
;;
|
;;
|
||||||
apk)
|
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
|
"$ESCALATION_TOOL" "$PACKAGER" add librewolf
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -21,9 +21,6 @@ installJitsi() {
|
||||||
dnf)
|
dnf)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" install -y jitsi-meet
|
"$ESCALATION_TOOL" "$PACKAGER" install -y jitsi-meet
|
||||||
;;
|
;;
|
||||||
apk)
|
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" add jitsi-meet
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -23,9 +23,6 @@ installSignal() {
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" copr enable luminoso/Signal-Desktop
|
"$ESCALATION_TOOL" "$PACKAGER" copr enable luminoso/Signal-Desktop
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" install -y 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}"
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -47,8 +47,6 @@ installLinutil() {
|
||||||
;;
|
;;
|
||||||
apk)
|
apk)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" add build-base
|
"$ESCALATION_TOOL" "$PACKAGER" add build-base
|
||||||
"$ESCALATION_TOOL" sed -i '/community/s/^#//' /etc/apk/repositories
|
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" update
|
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" add rustup
|
"$ESCALATION_TOOL" "$PACKAGER" add rustup
|
||||||
rustup-init
|
rustup-init
|
||||||
. $HOME/.cargo/env
|
. $HOME/.cargo/env
|
||||||
|
|
|
@ -21,8 +21,6 @@ updateLinutil() {
|
||||||
;;
|
;;
|
||||||
apk)
|
apk)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" add build-base
|
"$ESCALATION_TOOL" "$PACKAGER" add build-base
|
||||||
"$ESCALATION_TOOL" sed -i '/community/s/^#//' /etc/apk/repositories
|
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" update
|
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" add rustup
|
"$ESCALATION_TOOL" "$PACKAGER" add rustup
|
||||||
rustup-init
|
rustup-init
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -82,6 +82,12 @@ checkPackageManager() {
|
||||||
fi
|
fi
|
||||||
done
|
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
|
if [ -z "$PACKAGER" ]; then
|
||||||
printf "%b\n" "${RED}Can't find a supported package manager${RC}"
|
printf "%b\n" "${RED}Can't find a supported package manager${RC}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -50,7 +50,8 @@ installDepend() {
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -n install $DEPENDENCIES
|
"$ESCALATION_TOOL" "$PACKAGER" -n install $DEPENDENCIES
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
|
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}"
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
@ -95,6 +96,8 @@ installAdditionalDepend() {
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -n install $DISTRO_DEPS
|
"$ESCALATION_TOOL" "$PACKAGER" -n install $DISTRO_DEPS
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
printf "%b\n" "${RED}Unsupported package manager ${PACKAGER}${RC}"
|
||||||
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,11 @@ install_theme_tools() {
|
||||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm qt6ct kvantum
|
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm qt6ct kvantum
|
||||||
;;
|
;;
|
||||||
apk)
|
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
|
"$ESCALATION_TOOL" "$PACKAGER" add qt6ct kvantum
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
. ../common-script.sh
|
. ../common-script.sh
|
||||||
|
. ../common-service-script.sh
|
||||||
|
|
||||||
cleanup_system() {
|
cleanup_system() {
|
||||||
printf "%b\n" "${YELLOW}Performing system cleanup...${RC}"
|
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 /var/tmp -type f -atime +5 -delete
|
||||||
"$ESCALATION_TOOL" find /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 {} \;
|
"$ESCALATION_TOOL" find /var/log -type f -name "*.log" -exec truncate -s 0 {} \;
|
||||||
|
if [ "$INIT_MANAGER" = "systemctl" ]; then
|
||||||
"$ESCALATION_TOOL" journalctl --vacuum-time=3d
|
"$ESCALATION_TOOL" journalctl --vacuum-time=3d
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_data() {
|
clean_data() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user