-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.sh
40 lines (34 loc) · 1.5 KB
/
setup.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
#!/bin/bash
# Script to install the BerryNet repo onto a
# Debian or Ubuntu system.
#
# curl -sL https://raw.githubusercontent.com/DT42/BerryNet-repo/master/setup.sh | sudo -E bash -
# or
# wget -qO- https://raw.githubusercontent.com/DT42/BerryNet-repo/master/setup.sh | sudo -E bash -
#
set -e
get_distribution() {
echo $(lsb_release -c -s)
}
echo 'Adding the BerryNet signing key to your keyring...'
curl -sL https://raw.githubusercontent.com/DT42/BerryNet-repo/master/berrynetrepo.gpg.key | apt-key add -
echo "Creating apt sources list file for the BerryNet repo..."
dist=$(get_distribution)
if [ $dist == "buster" ]; then
curl -sL -o /etc/apt/sources.list.d/berrynet.list \
https://raw.githubusercontent.com/DT42/BerryNet/master/config/berrynet-buster.list
elif [ $dist == "xenial" ]; then
curl -sL -o /etc/apt/sources.list.d/berrynet.list \
https://raw.githubusercontent.com/DT42/BerryNet/master/config/berrynet-xenial.list
elif [ $dist == "bionic" ]; then
curl -sL -o /etc/apt/sources.list.d/berrynet.list \
https://raw.githubusercontent.com/DT42/BerryNet/master/config/berrynet-bionic.list
elif [ $dist == "focal" ]; then
curl -sL -o /etc/apt/sources.list.d/berrynet.list \
https://raw.githubusercontent.com/DT42/BerryNet/master/config/berrynet-focal.list
else
curl -sL -o /etc/apt/sources.list.d/berrynet.list \
https://raw.githubusercontent.com/DT42/BerryNet/master/config/berrynet.list
fi
echo 'Running `apt-get update` for you...'
apt-get update