Skip to content

Commit

Permalink
added bottles install script
Browse files Browse the repository at this point in the history
  • Loading branch information
guruswarupa committed Sep 19, 2024
1 parent d81e3af commit 4471ebb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
36 changes: 36 additions & 0 deletions tabs/applications-setup/bottles-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/sh -e

. ../common-script.sh

install_bottles() {
printf "%b\n" "${YELLOW}Installing Bottles...${RC}"
if ! command_exists flatpak; then
case $PACKAGER in
pacman)
$ESCALATION_TOOL ${PACKAGER} -Syu --noconfirm flatpak
;;
apt-get)
$ESCALATION_TOOL ${PACKAGER} update && $ESCALATION_TOOL ${PACKAGER} install -y flatpak
;;
dnf)
$ESCALATION_TOOL ${PACKAGER} install -y flatpak
;;
zypper)
$ESCALATION_TOOL ${PACKAGER} install flatpak
;;
*)
printf "%b\n" "${RED}Your Linux distribution is not supported by this script.${RC}"
printf "%b\n" "${YELLOW}You can try installing Bottles using Flatpak manually:${RC}"
printf "%b\n" "1. Install Flatpak: https://flatpak.org/setup/"
printf "%b\n" "2. Install Bottles: flatpak install flathub com.usebottles.bottles"
;;
esac
fi
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub com.usebottles.bottles
printf "%b\n" "${GREEN}Bottles installed successfully. Restart the system to apply changes...${RC}"
}

checkEnv
checkEscalationTool
install_bottles2
6 changes: 5 additions & 1 deletion tabs/applications-setup/tab_data.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ script = "zsh-setup.sh"

[[data]]
name = "Fastfetch"
script = "fastfetch-setup.sh"
script = "fastfetch-setup.sh"

[[data]]
name = "Bottles setup"
script = "bottles-setup.sh"

0 comments on commit 4471ebb

Please sign in to comment.