-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·31 lines (26 loc) · 985 Bytes
/
build.sh
File metadata and controls
executable file
·31 lines (26 loc) · 985 Bytes
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
#!/usr/bin/env bash
# pycharm will mess up the encoding from windows. Run this to fix.
dos2unix build.sh
dos2unix db-audio-pi_1.3/DEBIAN/control
dos2unix db-audio-pi_1.3/DEBIAN/postinst
dos2unix db-audio-pi_1.3/DEBIAN/preinst
dos2unix db-audio-pi_1.3/etc/bt_speaker/hooks/startup
dos2unix db-audio-pi_1.3/etc/bt_speaker/hooks/track
dos2unix db-audio-pi_1.3/opt/db/db-audio-pi/scripts/spotify.sh
# fix permissions
chmod 0775 db-audio-pi_1.3/DEBIAN/preinst
chmod 0775 db-audio-pi_1.3/DEBIAN/postinst
chmod 0775 db-audio-pi_1.3/DEBIAN/control
# stop and remove old service
/bin/systemctl disable db-audio-pi
/bin/systemctl stop db-audio-pi
/usr/bin/dpkg -P db-audio-pi
/bin/systemctl daemon-reload
# build and install new package
chmod +x db-audio-pi_1.3/DEBIAN/preinst
/usr/bin/dpkg-deb --build db-audio-pi_1.3
/usr/bin/dpkg -i --force-overwrite db-audio-pi_1.3.deb
# start new service
/bin/systemctl daemon-reload
/bin/systemctl start db-audio-pi
/bin/systemctl enable db-audio-pi