File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /usr/ bin/env bash
22
3- echo " Installing AMBCT... "
3+ set -e
44
5- wget -q https://raw.githubusercontent.com/BlitzPythoner/AMBCT-Linux-Repo/main/public.key -O /tmp/ambct.key
6- gpg --dearmor < /tmp/ambct.key | sudo tee /usr/share/keyrings/ambct.gpg > /dev/null
5+ echo " ==> Installing AMBCT..."
76
8- echo " deb [signed-by=/usr/share/keyrings/ambct.gpg] https://raw.githubusercontent.com/BlitzPythoner/AMBCT-Linux-Repo/main/ stable main" | sudo tee /etc/apt/sources.list.d/ambct.list
7+ KEYRING=" /usr/share/keyrings/ambct.gpg"
8+ SOURCE_LIST=" /etc/apt/sources.list.d/ambct.list"
9+ REPO_URL=" https://blitzpythoner.github.io/AMBCT-Linux-Repo"
910
10- sudo apt update
11- sudo apt install -y ambct
11+ # Check for root
12+ if [[ " $EUID " -ne 0 ]]; then
13+ echo " Please run this script as root (sudo)."
14+ exit 1
15+ fi
1216
13- echo " Done."
17+ echo " ==> Installing GPG key..."
18+
19+ curl -fsSL " $REPO_URL /public.key" | gpg --dearmor -o " $KEYRING "
20+
21+ chmod 644 " $KEYRING "
22+
23+ echo " ==> Adding repository..."
24+
25+ echo " deb [signed-by=$KEYRING ] $REPO_URL stable main" > " $SOURCE_LIST "
26+
27+ echo " ==> Updating package lists..."
28+ apt update
29+
30+ echo " ==> Installing ambct..."
31+ apt install -y ambct
32+
33+ echo " ==> Done."
You can’t perform that action at this time.
0 commit comments