-
Notifications
You must be signed in to change notification settings - Fork 38
/
install.sh
executable file
·129 lines (102 loc) · 2.9 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/env bash
set -eEu
set -x
THIS_DIR="$(dirname "$(readlink -f "$0")")"
PREFIX=$1
if ! [[ "$PREFIX" = /* ]]; then
echo "$PREFIX is not an absolute path"
exit -2
fi
#if [ ! -d "$PREFIX" ]; then
# echo "Directory $PREFIX does not exist"
# exit -1
#fi
mkdir -p "$PREFIX"
TARGET="$PREFIX/radium"
if [ -d "$TARGET" ]; then
echo "Directory $TARGET already exist. Please uninstall program first"
exit -1
fi
echo $TARGET
mkdir -p "$TARGET"
cd "$THIS_DIR/bin"
can_copy() {
if [[ "$1" = *"packages"* ]]; then
return 1 # in bash, 1 is false and 0 is true.
elif [[ "$1" = *.rad ]]; then
return 1
elif [[ "$1" = *.bak ]]; then
return 1
elif [[ "$1" = *_audio ]]; then
return 1
elif [[ "$1" = *.wav ]]; then
return 1
elif [[ "$1" = *.radium_peaks ]]; then
return 1
elif [[ "$1" = *.rec ]]; then
return 1
elif [[ "$1" = *.mrec ]]; then
return 1
else
return 0
fi
}
for a in * ; do
if can_copy "$a"; then
cp -a "$a" "$TARGET/"
fi
done
if test -f /tmp/radium_bin/radium_linux.bin; then
rm -f "$TARGET/radium_linux.bin"
cp -f /tmp/radium_bin/radium_linux.bin "$TARGET/"
fi
mkdir -p "$TARGET/packages"
# s7
cp -a packages/s7 "$TARGET/packages/"
rm -f "$TARGET/packages/s7/*.o"
# rm -fr "$TARGET/packages/s7/sndlib"
# faust
mkdir -p "$TARGET/packages/faust"
cp -a packages/faust/examples "$TARGET/packages/faust/"
cp -a packages/faust/architecture "$TARGET/packages/faust/"
cp -a packages/faust/libraries "$TARGET/packages/faust/"
rm -fr "$TARGET/packages/faust/architecture/webaudio"
rm -fr "$TARGET/packages/faust/architecture/osclib"
rm -fr "$TARGET/packages/faust/architecture/android"
rm -fr "$TARGET/packages/faust/architecture/iOS"
rm -fr "$TARGET/packages/faust/architecture/juce"
rm -fr "$TARGET/packages/faust/architecture/max-msp"
rm -fr "$TARGET/packages/faust/architecture/android"
rm -fr "$TARGET/packages/faust/architecture/node2js"
rm -fr "$TARGET/packages/faust/architecture/sam"
rm -fr "$TARGET/packages/faust/architecture/smartKeyboard"
rm -fr "$TARGET/packages/faust/architecture/soul"
rm -fr "$TARGET/packages/faust/architecture/teensy"
rm -fr "$TARGET/packages/faust/architecture/unity"
rm -fr "$TARGET/packages/faust/architecture/unsupported-arch"
rm -fr "$TARGET/python-midi/src/sequencer_osx"
# pure data
cp -a packages/libpd-master "$TARGET/packages/"
cd "$TARGET/packages/libpd-master"
make clean
rm -f libpds.o
cd "$THIS_DIR/bin"
echo "A1"
# ladspa
if [ ! -d "$TARGET/ladspa" ] && [ ! -L "$TARGET/ladspa" ]
then
echo "A2"
mkdir $TARGET/ladspa
fi
# libxcb
if uname -s |grep Linux ; then
if [ -v RADIUM_INSTALL_LIBXCB ] && [[ $RADIUM_INSTALL_LIBXCB != 0 ]]
then
cp -a packages/libxcb-1.13 "$TARGET/packages/"
cd "$TARGET/packages/libxcb-1.13/src"
rm -f ./*.o
cd "$THIS_DIR/bin"
fi
fi
# python27
cp -a packages/python27_install "$TARGET/packages/"