This repository has been archived by the owner on Oct 9, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
addrepo.sh
executable file
·55 lines (48 loc) · 1.89 KB
/
addrepo.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
#!/usr/bin/env bash
cat << "EOF"
.`
-dMMs
+MMMMMo
.dMMMMMMN-
+NMMMMMMMMd`
`hMMMMMMMMMMMo
-mMMMMMMMMMMMMN.
dMMMMMMMMMMMMMMo
:hmmmmmmmmmmmmdhs/. `MMMMMMMMMMMMMMMh
sMMMMMMMMMMMMMMMMMMd+NMMMMMMMMMMMMMM+
/NMMMMMMMMMMMMMMMMMMMMMMMMs+NMMMMMm/+syyyso/-`
`hMMMMMMMMMMMMMMMMMMMMMMo hMMMMMMMMMMMMMMMMMNhs+:.
/NMMMMMMMMMMMNmmNMMMMN. `mMMMMMMMMMMMMMMMMMMMMMMMNh-
.hMMMMMMMMMMh` `-sNMMs-hMMMMMMMMMMMMMMMMMMMMMMMMMM+
/mMMMMMMMMMNy+-./MMMMMMy:....oMMMMMMMMMMMMMMMNo.
:ymMMMMMMMMMMMMMMMMMNy//oymMMMMMMMMMMMMMNy:
.yMMMMMMMms:oMMNhNMMMMMMMMMMMMMMMMNh/`
.yMMMMMMMN/ .dMMy `sMMMMMMMMMMMNmy/`
/NMMMMMMMM:`-sMMMMM: sMMMMMMs-..`
-NMMMMMMMMMNNMMMMMMMMs./MMMMMMMh`
mMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMs
sMMMMMMMMMMMMMMMMhMMMMMMMMMMMMMMMN
:MMMMMMMMMMMMMMMN+ hMMMMMMMMMMMMMMN.
`dMMMMMMMMMMMMNh/` `hMMMMMMMMMMMMMN.
/MMMMMMMMmhs+- /dMMMMMMMMMMMN.
.hmdys/- -sNMMMMMMMMN.
`:hNMMMMMN.
`+dMMMN`
./+-
adding apt.adafruit.com to /etc/apt/sources.list
EOF
sleep 2
if grep -Fq "adafruit" /etc/apt/sources.list; then
echo "adafruit repo already added to apt sources"
else
# add apt repo to sources.list
if grep -q "8.0" "/etc/debian_version"; then
echo "deb http://apt.adafruit.com/raspbian/ jessie main" >> /etc/apt/sources.list
else
echo "deb http://apt.adafruit.com/raspbian/ wheezy main" >> /etc/apt/sources.list
fi
# import repo key
wget -O - -q https://apt.adafruit.com/apt.adafruit.com.gpg.key | apt-key add -
fi
# update package database
apt-get update