-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
73 lines (66 loc) · 1.9 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
# Floorp Browser Installer Script
# Detects OS and installs Floorp Browser accordingly
set -eu
main() {
OS=""
PACKAGE_TYPE=""
if [ -f /etc/os-release ]; then
. /etc/os-release
case "$ID" in
ubuntu|debian)
OS="ubuntu"
PACKAGE_TYPE="apt"
;;
arch|manjaro|endeavouros)
OS="arch"
PACKAGE_TYPE="pacman"
;;
*)
echo "Unsupported OS: $ID"
exit 1
;;
esac
else
echo "/etc/os-release not found. Cannot detect OS."
exit 1
fi
CAN_ROOT=""
SUDO=""
if [ "$(id -u)" = 0 ]; then
CAN_ROOT=1
SUDO=""
elif type sudo >/dev/null 2>&1; then
CAN_ROOT=1
SUDO="sudo"
else
echo "This installer requires root privileges. Install sudo or run as root."
exit 1
fi
case "$PACKAGE_TYPE" in
apt)
echo "Installing Floorp on Ubuntu/Debian..."
$SUDO curl -fsSL https://ppa.floorp.app/KEY.gpg | $SUDO gpg --dearmor -o /usr/share/keyrings/Floorp.gpg
$SUDO curl -sS --compressed -o /etc/apt/sources.list.d/Floorp.list "https://ppa.floorp.app/Floorp.list"
$SUDO apt update
$SUDO apt install -y floorp
;;
pacman)
echo "Installing Floorp on Arch-based systems via AUR..."
if ! command -v git >/dev/null 2>&1; then
$SUDO pacman -S --noconfirm git base-devel
fi
git clone https://aur.archlinux.org/floorp-bin.git
cd floorp-bin
makepkg -si --noconfirm
cd ..
rm -rf floorp-bin
;;
*)
echo "Unsupported package manager."
exit 1
;;
esac
echo "Installation complete! You can now run Floorp."
}
main