diff options
author | Feng Yu | 2024-04-15 09:10:40 +0800 |
---|---|---|
committer | Feng Yu | 2024-04-15 09:10:40 +0800 |
commit | 16b5d249bc89f7ff066a187d27611554eceb06c7 (patch) | |
tree | 6edb263744a2101bee5b6cf825a3b61ce8f2c7ee /lx-music-desktop.install | |
parent | b9242bc207d4375b398d1a0066bf1bbd6e3cce08 (diff) | |
download | aur-lx-music-desktop.tar.gz |
Upgrade to 2.7.0
Diffstat (limited to 'lx-music-desktop.install')
-rw-r--r-- | lx-music-desktop.install | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lx-music-desktop.install b/lx-music-desktop.install index 04f9a7764ec0..efbdfa33233b 100644 --- a/lx-music-desktop.install +++ b/lx-music-desktop.install @@ -5,9 +5,9 @@ post_install() { 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' + 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 + update-alternatives --install '/usr/bin/lx-music-desktop' 'lx-music-desktop' '/opt/lx-music-desktop/lx-music-desktop' 100 || ln -sf '/opt/lx-music-desktop/lx-music-desktop' '/usr/bin/lx-music-desktop' else ln -sf '/opt/lx-music-desktop/lx-music-desktop' '/usr/bin/lx-music-desktop' fi @@ -15,8 +15,13 @@ 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 +if hash update-mime-database 2>/dev/null; then + update-mime-database /usr/share/mime || true +fi + +if hash update-desktop-database 2>/dev/null; then + update-desktop-database /usr/share/applications || true +fi } post_remove() { |