mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-26 06:46:04 +00:00
Add basic apk to scripts
This commit is contained in:
parent
79eb752552
commit
0f79e00725
|
@ -12,6 +12,9 @@ installMeld() {
|
|||
apt-get|nala)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -y install meld
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add meld
|
||||
;;
|
||||
*)
|
||||
. ../setup-flatpak.sh
|
||||
flatpak install -y flathub org.gnome.meld
|
||||
|
|
|
@ -29,6 +29,9 @@ installNeovim() {
|
|||
dnf|zypper)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add neovim
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -9,6 +9,9 @@ installAlacritty() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add alacritty
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y alacritty
|
||||
;;
|
||||
|
|
|
@ -15,6 +15,9 @@ install_adb() {
|
|||
dnf|zypper)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y android-tools
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add android-tools
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -9,6 +9,9 @@ if ! command_exists chromium; then
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm chromium
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add chromium
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
|
||||
;;
|
||||
|
|
|
@ -18,6 +18,9 @@ installFirefox() {
|
|||
dnf)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add firefox
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -32,6 +32,9 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
|
|||
pacman)
|
||||
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add librewolf
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -9,6 +9,9 @@ installLynx() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lynx
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add lynx
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y lynx
|
||||
;;
|
||||
|
|
|
@ -21,6 +21,9 @@ 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
|
||||
|
|
|
@ -23,6 +23,9 @@ 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
|
||||
|
|
|
@ -9,6 +9,9 @@ installTelegram() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm telegram-desktop
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add telegram-desktop
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y telegram-desktop
|
||||
;;
|
||||
|
|
|
@ -9,6 +9,9 @@ installThunderBird() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm thunderbird
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add thunderbird
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y thunderbird
|
||||
;;
|
||||
|
|
|
@ -36,6 +36,9 @@ install_docker() {
|
|||
"$ESCALATION_TOOL" systemctl enable docker
|
||||
"$ESCALATION_TOOL" systemctl start docker
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add docker
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
@ -55,6 +58,9 @@ install_docker_compose() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm docker-compose
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add docker-cli-compose
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -14,6 +14,9 @@ installFastfetch() {
|
|||
"$ESCALATION_TOOL" "$PACKAGER" install -y /tmp/fastfetch.deb
|
||||
rm /tmp/fastfetch.deb
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add fastfetch
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch
|
||||
;;
|
||||
|
|
|
@ -9,6 +9,9 @@ installKitty() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm kitty
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add kitty
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y kitty
|
||||
;;
|
||||
|
|
|
@ -45,6 +45,14 @@ installLinutil() {
|
|||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. $HOME/.cargo/env
|
||||
;;
|
||||
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
|
||||
;;
|
||||
*)
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
. $HOME/.cargo/env
|
||||
|
|
|
@ -19,6 +19,13 @@ updateLinutil() {
|
|||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
. $HOME/.cargo/env
|
||||
;;
|
||||
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
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y rustup
|
||||
;;
|
||||
|
|
|
@ -11,6 +11,9 @@ installDepend() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig git
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add bash bash-completion tar bat tree unzip fontconfig git
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git
|
||||
;;
|
||||
|
|
|
@ -16,6 +16,9 @@ installLibreOffice() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add libreoffice
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -9,6 +9,9 @@ installEvince() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm evince
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add evince
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y evince
|
||||
;;
|
||||
|
|
|
@ -9,6 +9,9 @@ installOkular() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm okular
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add okular
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y okular
|
||||
;;
|
||||
|
|
|
@ -9,6 +9,9 @@ installRofi() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rofi
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add rofi
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y rofi
|
||||
;;
|
||||
|
|
|
@ -10,6 +10,9 @@ installZsh() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm zsh
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add zsh
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y zsh
|
||||
;;
|
||||
|
|
|
@ -127,7 +127,7 @@ checkDistro() {
|
|||
checkEnv() {
|
||||
checkEscalationTool
|
||||
checkCommandRequirements "curl groups $ESCALATION_TOOL"
|
||||
checkPackageManager 'nala apt-get dnf pacman zypper'
|
||||
checkPackageManager 'nala apt-get dnf pacman zypper apk'
|
||||
checkCurrentDirectoryWritable
|
||||
checkSuperUser
|
||||
checkDistro
|
||||
|
|
|
@ -9,6 +9,9 @@ installPkg() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm ufw
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add ufw
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y ufw
|
||||
;;
|
||||
|
|
|
@ -37,6 +37,9 @@ installDepend() {
|
|||
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install $DEPENDENCIES $COMPILEDEPS
|
||||
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install libgcc_s1-gcc7-32bit glibc-devel-32bit
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add build-base multitail tar tree trash-cli unzip cmake jq
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES
|
||||
;;
|
||||
|
|
|
@ -17,6 +17,9 @@ install_theme_tools() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm qt6ct kvantum
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add qt6ct kvantum
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -25,6 +25,9 @@ cleanup_system() {
|
|||
"$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -Rns $(pacman -Qtdq) --noconfirm > /dev/null 2>&1
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" cache clean
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
return 1
|
||||
|
|
|
@ -48,6 +48,9 @@ fastUpdate() {
|
|||
"$ESCALATION_TOOL" "$PACKAGER" ref
|
||||
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive dup
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" update
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
|
||||
exit 1
|
||||
|
@ -74,6 +77,10 @@ updateSystem() {
|
|||
"$ESCALATION_TOOL" "$PACKAGER" ref
|
||||
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive dup
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" update
|
||||
"$ESCALATION_TOOL" "$PACKAGER" upgrade
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -19,6 +19,9 @@ if ! command_exists openssl; then
|
|||
zypper)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install openssl
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add openssl
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
||||
exit 1
|
||||
|
|
|
@ -19,6 +19,9 @@ installAutoCpufreq() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm git
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add git
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y git
|
||||
;;
|
||||
|
|
|
@ -11,6 +11,9 @@ install_package() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$PACKAGE"
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add $PACKAGE
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y "$PACKAGE"
|
||||
;;
|
||||
|
@ -34,6 +37,10 @@ setup_ssh() {
|
|||
install_package openssh
|
||||
SSH_SERVICE="sshd"
|
||||
;;
|
||||
apk)
|
||||
install_package openssh
|
||||
SSH_SERVICE="sshd"
|
||||
;;
|
||||
*)
|
||||
install_package openssh-server
|
||||
SSH_SERVICE="sshd"
|
||||
|
|
|
@ -12,9 +12,11 @@ install_timeshift() {
|
|||
pacman)
|
||||
"$ESCALATION_TOOL" "${PACKAGER}" -S --noconfirm timeshift
|
||||
;;
|
||||
*)
|
||||
dnf|zypper|apt-get|nala)
|
||||
"$ESCALATION_TOOL" "${PACKAGER}" install -y timeshift
|
||||
;;
|
||||
*)
|
||||
printf "%b\n" "${RED}Unsupported pacakge manager.${RC}"
|
||||
esac
|
||||
else
|
||||
printf "%b\n" "${GREEN}Timeshift is already installed.${RC}"
|
||||
|
|
|
@ -13,6 +13,9 @@ setup_xrandr() {
|
|||
apt-get|nala)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y x11-xserver-utils
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add xrandr
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg-x11-server-utils
|
||||
;;
|
||||
|
|
|
@ -13,6 +13,9 @@ setupNetworkManager() {
|
|||
dnf)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y NetworkManager-1
|
||||
;;
|
||||
apk)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" add networkmanager-wifi iwd
|
||||
;;
|
||||
*)
|
||||
"$ESCALATION_TOOL" "$PACKAGER" install -y network-manager
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user