blob: 04f9a7764ec01e85f3f5fbb9cfd1d5ea2e9e74b3 (
plain)
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
|
post_install() {
:
#!/bin/bash
if type update-alternatives 2>/dev/null >&1; then
# Remove previous link if it doesn't use update-alternatives
if [ -L '/usr/bin/lx-music-desktop' -a -e '/usr/bin/lx-music-desktop' -a "`readlink '/usr/bin/lx-music-desktop'`" != '/etc/alternatives/lx-music-desktop' ]; then
rm -f '/usr/bin/lx-music-desktop'
fi
update-alternatives --install '/usr/bin/lx-music-desktop' 'lx-music-desktop' '/opt/lx-music-desktop/lx-music-desktop' 100
else
ln -sf '/opt/lx-music-desktop/lx-music-desktop' '/usr/bin/lx-music-desktop'
fi
# SUID chrome-sandbox for Electron 5+
chmod 4755 '/opt/lx-music-desktop/chrome-sandbox' || true
update-mime-database /usr/share/mime || true
update-desktop-database /usr/share/applications || true
}
post_remove() {
:
#!/bin/bash
# Delete the link to the binary
if type update-alternatives >/dev/null 2>&1; then
update-alternatives --remove 'lx-music-desktop' '/usr/bin/lx-music-desktop'
else
rm -f '/usr/bin/lx-music-desktop'
fi
}
|