forked from mruby-zest/mruby-zest-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-linux.sh
executable file
·115 lines (96 loc) · 3.14 KB
/
install-linux.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
#This script needs:
# - To be run in the directory of the extracted tarball
# - To be run as root
echo "This install script:"
echo " 1. Removes old ZynAddSubFX installs"
echo " 2. Installs zyn-fusion to /opt/zyn-fusion/"
echo " 3. Creates symbolic links in /usr to the zyn-fusion install in /opt"
echo ""
echo "If you're ok with this press enter, otherwise press CTRL+C"
echo "and read the script for specifics"
read
#Verify this script is run in the correct directory
if [ ! -f ./zynaddsubfx ]
then
echo "zynaddsubfx wasn't found in the current directory"
echo "please run the script from witin the package directory"
exit
fi
if [ ! -f ./zyn-fusion ]
then
echo "zyn-fusion wasn't found in the current directory"
echo "please run the script from witin the package directory"
exit
fi
if [ ! -f ./libzest.so ]
then
echo "libzest.so wasn't found in the current directory"
echo "please run the script from witin the package directory"
exit
fi
#Clean up any old installs
echo "Cleaning Up Any Old Zyn Installs"
echo "...Zyn-Fusion data dir"
rm -rf /opt/zyn-fusion
echo "...ZynAddSubFX binaries"
rm -f /usr/bin/zynaddsubfx
rm -f /usr/local/bin/zynaddsubfx
rm -f /usr/bin/zyn-fusion
rm -f /usr/local/bin/zyn-fusion
echo "...ZynAddSubFX banks"
rm -rf /usr/share/zynaddsubfx/banks
rm -rf /usr/local/share/zynaddsubfx/banks
echo "...ZynAddSubFX vst"
rm -rf /usr/lib/vst/ZynAddSubFX.so
rm -rf /usr/lib64/vst/ZynAddSubFX.so
rm -rf /usr/local/lib/vst/ZynAddSubFX.so
rm -rf /usr/local/lib64/vst/ZynAddSubFX.so
echo "...ZynAddSubFX lv2"
rm -rf /usr/lib/lv2/ZynAddSubFX.lv2
rm -rf /usr/lib64/lv2/ZynAddSubFX.lv2
rm -rf /usr/lib/lv2/ZynAddSubFX.lv2presets
rm -rf /usr/lib64/lv2/ZynAddSubFX.lv2presets
rm -rf /usr/local/lib/lv2/ZynAddSubFX.lv2
rm -rf /usr/local/lib64/lv2/ZynAddSubFX.lv2
rm -rf /usr/local/lib/lv2/ZynAddSubFX.lv2presets
rm -rf /usr/local/lib64/lv2/ZynAddSubFX.lv2presets
echo "Installing Zyn Fusion"
mkdir -p /opt/zyn-fusion/
cp -a ./* /opt/zyn-fusion
echo "Installing Symbolic Links"
echo "...Zyn-Fusion"
ln -s /opt/zyn-fusion/zyn-fusion /usr/bin/
echo "...ZynAddSubFX"
ln -s /opt/zyn-fusion/zynaddsubfx /usr/bin/
echo "...Banks"
mkdir -p /usr/share/zynaddsubfx/
ln -s /opt/zyn-fusion/banks /usr/share/zynaddsubfx/banks
echo "...vst version"
if [ -d "/usr/lib64/vst/" ]
then
ln -s /opt/zyn-fusion/ZynAddSubFX.so /usr/lib64/vst/
else
mkdir -p /usr/lib/vst
ln -s /opt/zyn-fusion/ZynAddSubFX.so /usr/lib/vst/
fi
echo "...lv2 version"
if [ -d "/usr/lib64/lv2/" ]
then
ln -s /opt/zyn-fusion/ZynAddSubFX.lv2 /usr/lib64/lv2/
ln -s /opt/zyn-fusion/ZynAddSubFX.lv2presets /usr/lib64/lv2/
else
mkdir -p /usr/lib/lv2/
ln -s /opt/zyn-fusion/ZynAddSubFX.lv2 /usr/lib/lv2/
ln -s /opt/zyn-fusion/ZynAddSubFX.lv2presets /usr/lib/lv2/
fi
echo "...bash completion"
bashcompdir=$(pkg-config --variable=completionsdir bash-completion)
if [ "$bashcompdir" ]
then
echo ln -s /opt/zyn-fusion/completions/zyn-fusion $bashcompdir/zyn-fusion
fi
echo ""
echo "Thank you for supporting Zyn-Fusion"
echo "You can now use the 3.0.3 release via a LV2/VST plugin host or"
echo "by running the standalone via 'zynaddsubfx'"