-
Notifications
You must be signed in to change notification settings - Fork 205
/
install
executable file
·39 lines (30 loc) · 1.31 KB
/
install
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
#!/bin/bash
version_armhf=4.4.3.242971445
version_arm64=4.4.3.242971445
if [ $arch == 32 ];then
version_select="$version_armhf"
url_arch=armv7l
elif [ $arch == 64 ];then
version_select="$version_arm64"
url_arch=aarch64
else
error "Failed to detect OS CPU architecture! Something is very wrong."
fi
if package_installed musescore ;then
status "First removing musescore package with APT..."
sudo apt purge musescore -y --autoremove || exit 1
fi
enable_module fuse || exit 1
wget -O "/tmp/MuseScore.AppImage" "https://github.com/musescore/MuseScore/releases/download/v${version_select%.*}/MuseScore-Studio-${version_select}-${url_arch}.AppImage" || exit 1
chmod +x "/tmp/MuseScore.AppImage"
#Use built-in install procedure
sudo /tmp/MuseScore.AppImage install || error "MuseScore.AppImage failed to run its own installation procedure. Please review errors above."
#this moves itself to /usr/local/bin/MuseScore.AppImage
#make terminal command
sudo rm -f /usr/local/bin/mscore
sudo ln -s /usr/local/bin/MuseScore.AppImage /usr/local/bin/mscore
#remove "Portable" from menu button
sudo sed -i 's/ Portable$//g' /usr/local/share/applications/org.musescore.MuseScore4portable.desktop
# update timestamp of top level icon directory to signal icon cache to be refreshed
sudo touch /usr/local/share/icons
true #in case touch fails