-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathinstall.sh
74 lines (57 loc) · 1.93 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
alias=r1
. /srv/http/bash/settings/addons.sh
# 20250111
if [[ -e /boot/kernel.img ]]; then
if [[ $( pacman -Q cava ) != 'cava 0.7.4-1' ]]; then
wget https://github.com/rern/rern.github.io/raw/refs/heads/main/armv6h/cava-0.7.4-1-any.pkg.tar.xz
pacman -U --noconfirm cava-0.7.4-1-any.pkg.tar.xz
rm cava-0.7.4-1-any.pkg.tar.xz
fi
else
[[ $( pacman -Q cava ) != 'cava 0.10.3-2' ]] && pacman -Sy --noconfirm cava
fi
if [[ $( pacman -Q python-rpi-gpio ) != 'python-rpi-gpio 0.7.1-3' ]]; then
pacman -R --noconfirm python-rpi-gpio
pacman -Sy --noconfirm python-rpi-gpio
fi
file=/etc/systemd/system/mpd_oled.service
if [[ -e $file ]]; then
rm -f $file
pacman -R --noconfirm audio_spectrum_oled &> /dev/null
pacman -Sy --noconfirm mpd_oled
fi
file=$dirsystem/lcdchar.conf
if [[ -e $dirsystem/lcdchar.conf ]]; then
conf2json $file | jq > ${file/conf/json}
rm -f $file
fi
# 20241208
rm -f $dirshm/playlist*
dir=/srv/http/assets/img/guide
if [[ -e $dir/58.jpg ]]; then
rm $dir/*
curl -skL https://github.com/rern/_assets/raw/master/guide/guide.tar.xz | bsdtar xf - -C $dir
fi
file=/etc/pacman.conf
if ! grep -q linux-rpi $file; then
[[ -e /boot/kernel7.img ]] && ignore='libunwind mesa'
sed -i -e '/^#*IgnorePkg/ d' -e "/^#*IgnoreGroup/ i\IgnorePkg = linux-rpi $ignore" $file
fi
if [[ -e /boot/kernel7.img ]] && ! grep -q mesa $file; then
sed -i '/^IgnorePkg/ s/$/ mesa/' $file
fi
[[ ! -e /boot/kernel.img ]] && sed -i '/^brightness/ d' $dirsystem/localbrowser.conf
# 20241130
systemctl -q is-active mediamtx && touch $dirsystem/dabradio
#-------------------------------------------------------------------------------
installstart "$1"
rm -rf /srv/http/assets/{css,js} /srv/http/{bash,settings}
getinstallzip
. $dirbash/common.sh
dirPermissions
$dirbash/cmd.sh cachebust
[[ -e $dirsystem/color ]] && $dirbash/cmd.sh color
installfinish
# 20241130
[[ -e $dirsystem/camilladsp && ! -e $dirshm/hwparams ]] && $dirsettings/camilla-devices.sh