-
Notifications
You must be signed in to change notification settings - Fork 39
/
install.sh
executable file
·68 lines (56 loc) · 1.38 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
#!/bin/bash
apps=(bees mix)
mods=(acid dacs dsyn fmsynth grains lines waves)
synopsis="usage: $0 [-h] [-a <app1>,<app2> ...] [-m <mod1>,<mod2> ...] /path/to/ALEPH"
args=`getopt ha:m: $*`
if [ $? != 0 ]; then
echo "$synopsis"
exit 2
fi
set -- $args
for i; do
case "$i"
in
-h)
echo "$synopsis"; exit 0;;
-a)
arg_apps=$2; shift 2;;
-m)
arg_mods=$2; shift 2;;
--)
shift; break;;
esac
done
if [ -z "$1" ]; then
echo "$synopsis"
exit 2
fi
install_root=$1
if [ -n "$arg_apps" ]; then
apps=(`echo $arg_apps | sed -e 's/,/ /g'`)
fi
if [ -n "$arg_mods" ]; then
mods=(`echo $arg_mods | sed -e 's/,/ /g'`)
fi
echo "=== apps: ${apps[@]}"
echo "=== mods: ${mods[@]}"
# FIXME: eliminate the special case logic for bees below...
mkdir -pv $install_root/app
mkdir -pv $install_root/mod
mkdir -pv $install_root/data
mkdir -pv $install_root/data/bees
mkdir -pv $install_root/data/bees/scalers
mkdir -pv $install_root/data/bees/scenes
cp -v utils/param_scaling/scaler_*.dat $install_root/data/bees/scalers/
cp -v utils/release/scenes/*.scn $install_root/data/bees/scenes/
cp -v utils/release/copy.command $install_root/
# apps
for a in ${apps[@]}; do
echo "=== app: $a"
cp -v apps/${a}/aleph-${a}*.hex $install_root/app/
done
# modules
for m in ${mods[@]}; do
echo "=== mod: $m"
cp -v modules/${m}/${m}.{ldr,dsc,lab} $install_root/mod/
done