-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
32 lines (22 loc) · 704 Bytes
/
install.sh
File metadata and controls
32 lines (22 loc) · 704 Bytes
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
#!/usr/bin/env bash
set -e
REPO_URL="https://blitzpythoner.github.io/AMBCT-Linux-Repo"
KEY_URL="$REPO_URL/public.key"
KEYRING="/usr/share/keyrings/ambct.gpg"
SOURCE_LIST="/etc/apt/sources.list.d/ambct.list"
echo "==> Installing AMBCT..."
# Root check
if [[ "$EUID" -ne 0 ]]; then
echo "Run this script with sudo."
exit 1
fi
echo "==> Downloading and installing GPG key..."
curl -fsSL "$KEY_URL" | gpg --dearmor -o "$KEYRING"
chmod 644 "$KEYRING"
echo "==> Adding APT repository..."
echo "deb [signed-by=$KEYRING] $REPO_URL stable main" > "$SOURCE_LIST"
echo "==> Updating package list..."
apt update
echo "==> Installing ambct..."
apt install -y ambct
echo "==> Installation complete."