-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall.sh
51 lines (40 loc) · 1.11 KB
/
install.sh
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
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/bash
tag="%%tag%%"
rpm="%%rpm%%"
deb="%%deb%%"
base="https://github.com/ahqsoftwares/tauri-ahq-store/releases/download/$tag"
arch=$(uname -m)
if [ "$arch" = "x86_64" ]; then
echo "Downloading AHQ Store for x86_64 architecture"
elif [ "$arch" = "aarch64" ]; then
echo "AHQ Store is not supported for arm64 architecture"
else
echo "Unsupported architecture $arch"
fi
echo "Please wait while we download the required packages..."
service="$base/ahqstore_setup_linux_amd64"
PS3='Which package manager shall we use?: '
options=("apt" "rpm")
select opt in "${options[@]}"
do
case $opt in
"apt")
echo "Installing flatpak"
sudo add-apt-repository ppa:flatpak/stable
sudo apt update
sudo apt install flatpak
download="$tag/$deb"
break
;;
"rpm")
echo "Please enter the command to install flatpak"
read command
sudo $command
download="$tag/$rpm"
break
;;
*) echo "invalid option $REPLY";;
esac
done
echo "Installing FlatHub repository"
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo