-
-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·54 lines (44 loc) · 1.58 KB
/
install.sh
File metadata and controls
executable file
·54 lines (44 loc) · 1.58 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
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
set -e
SOURCE_REPO="deb [signed-by=/usr/share/keyrings/raspotify_key.asc] https://dtcooper.github.io/raspotify raspotify main"
ERROR_MESG="Please make sure you are running a compatible armhf (ARMv7), arm64, amd64 or riscv64 Debian based OS."
SUDO="sudo"
if ! which apt-get >/dev/null; then
echo "\nUnspported OS:\n"
echo "$ERROR_MESG"
exit 1
fi
if uname -a | grep -F -ivq -e armv7 -e aarch64 -e x86_64 -e riscv64; then
echo "\nUnspported architecture:\n"
echo "$ERROR_MESG"
echo "\nSupport for ARMv6 (Pi v1 and Pi Zero v1.x) has been dropped."
echo "0.31.8.1 was the last version to be built with ARMv6 support."
echo "\nhttps://github.com/dtcooper/raspotify/releases/tag/0.31.8.1\n"
echo "You can install and run that version on an ARMv6 device,"
echo "but you will never get updates and doing so is completely unsupported."
exit 1
fi
if ! which sudo >/dev/null; then
SUDO=""
if [ "$(id -u)" -ne 0 ]; then
echo "\nInsufficient privileges:\n"
echo "Please run this script as root."
exit 1
fi
fi
$SUDO curl -sSfL https://dtcooper.github.io/raspotify/key.asc -o /usr/share/keyrings/raspotify_key.asc
$SUDO chmod 644 /usr/share/keyrings/raspotify_key.asc
echo "$SOURCE_REPO" | $SUDO tee /etc/apt/sources.list.d/raspotify.list
$SUDO apt-get update
$SUDO apt-get -y install raspotify
echo
echo "Thanks for installing Raspotify!"
echo
echo "Check the Wiki for tips, tricks and configuration info:"
echo
echo " https://github.com/dtcooper/raspotify/wiki"
echo
echo "And if you're feeling generous, you could buy me a beer:"
echo
echo " https://github.com/sponsors/kimtore"
echo