-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sh
42 lines (38 loc) · 1.02 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
#!/bin/sh
# set -x
declare_variables() {
mapping_file="marS_PioneerDJMS9v169.xml"
mapping_destination="${HOME}/Music/_Serato_/MIDI/Xml/"
}
test_mapping_location_exists() {
if [ -d "${mapping_destination}" ];
then
echo "\t..mapping location exists."
cd "${mapping_destination}"
else
echo "\t..mapping location does not exist here."
echo "\t..try installing Serato DJ Pro first."
exit 0
fi
}
test_mapping_exists() {
if [[ -e "${mapping_file}" ]];
then
echo "\t..you already have a copy of the current version of the mapping.\n\n"
read -p "Overwrite ${mapping_file}? " -n 1;
echo "";
if [[ $REPLY =~ ^[Yy]$ ]]; then
curl -LJO https://raw.githubusercontent.com/marscanbueno/MidiMaps/master/marS_PioneerDJMS9v169.xml
fi
else
echo "\t..attemting to download and install ${mapping_file}.\n\n"
curl -LJO https://raw.githubusercontent.com/marscanbueno/MidiMaps/master/marS_PioneerDJMS9v169.xml
fi
}
# start script
clear
declare_variables
test_mapping_location_exists
test_mapping_exists
# end script
exit