-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStratOS-choose-github
executable file
·39 lines (37 loc) · 1.2 KB
/
StratOS-choose-github
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
bash $(realpath $(dirname $0))/maneki-logo
menu(){
dialog --clear --title "Which GitHub Desktop do you want?" \
--menu "Choose one of the following options:" 15 40 3 \
1 "GitHub-Desktop-bin (AUR)" \
2 "GitHub Desktop (Flatpak)" \
3 "Exit" 2>&1 >/dev/tty
}
check_flatpak() {
if ! command -v flatpak &>/dev/null; then
echo "Flatpak is not installed. Installing flatpak!"
sudo pacman -S --needed flatpak
flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
exit 1
fi
}
while true; do
choice=$(menu)
case $choice in
1)
echo "Downloading github-desktop-bin (AUR)..."
yay -S github-desktop-bin --noconfirm
echo -e "\n==> Downloaded and Installed github-desktop-bin (AUR)."
;;
2)
check_flatpak
echo "Downloading io.github.shiftey.Desktop (Flatpak)..."
flatpak install flathub io.github.shiftey.Desktop
echo -e "\n==> Downloaded and Installed io.github.shiftey.Desktop (Flatpak)."
;;
3)
echo "Exiting..."
exit 0
;;
esac
done