-
Notifications
You must be signed in to change notification settings - Fork 4
/
prep_install.sh
executable file
·35 lines (26 loc) · 1.07 KB
/
prep_install.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
#!/bin/bash
#============================== Error Handler ==========================
function excmd {
echo "==================> Executing: $*"
if ! $*; then
echo "Exiting script due to error from: $*"
exit 1
fi
}
#============================== End Error Handler ======================
# Adds pulseaudio-dlna repo to sources list
echo \n | apt-add-repository ppa:qos/pulseaudio-dlna
# Adds shairport-sync repo to the sources list
echo \n | apt-add-repository ppa:dantheperson/shairplay-sync
# Adds nodejs to the sources list
curl -sL https://deb.nodesource.com/setup | bash -
# Updates and upgrades the sources and installed files
echo \n | apt-get update -y
echo \n | apt-get upgrade -y
# Creates an /etc/asound.conf file in case it doesn't exist so that backing up the /etc/asound.conf file doesn't faile
echo "" | tee -a /etc/asound.conf
# Backs up the existing /etc/asound.conf file to /etc/asound.conf.old
excmd cp /etc/asound.conf /etc/asound.conf.old
# Copies the repo given asound.conf file to the proper location
excmd cp etc/asound.conf /etc/asound.conf
exit 0