forked from Vencord/Installer
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·42 lines (34 loc) · 1.1 KB
/
install.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1.1 KB
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
#!/bin/sh
set -e
if [ "$(id -u)" -eq 0 ]; then
echo "Run me as normal user, not root!"
exit 1
fi
if grep -q "CHROMEOS_RELEASE_NAME" /etc/lsb-release 2>/dev/null; then
echo "ChromeOS is not supported! Use the chrome extension. https://chromewebstore.google.com/detail/equicord-web/mcambpfmpjnncfoodejdmehedbkjepmi"
exit 1
fi
outfile=$(mktemp --tmpdir="$HOME")
trap 'rm -f "$outfile"' EXIT
echo "Downloading Installer..."
set -- "XDG_CONFIG_HOME=$XDG_CONFIG_HOME"
curl -sS https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux \
--output "$outfile" \
--location \
--fail
chmod +x "$outfile"
if command -v sudo >/dev/null; then
echo "Running with sudo"
sudo env "$@" "$outfile"
elif command -v doas >/dev/null; then
echo "Running with doas"
doas env "$@" "$outfile"
elif command -v run0 >/dev/null; then
echo "Running with run0"
run0 env "$@" "$outfile"
elif command -v pkexec >/dev/null; then
echo "Running with pkexec"
pkexec env "$@" "SUDO_USER=$(whoami)" "$outfile"
else
echo "Neither sudo nor doas were found. Please install either of them to proceed."
fi