-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrun.sh
49 lines (45 loc) · 1.25 KB
/
run.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
#!/bin/sh
# Detect os type
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
CYGWIN*) machine=Cygwin;;
MINGW*) machine=MinGw;;
*) machine="UNKNOWN:${unameOut}"
esac
# Set correct build path
if [ "${machine}" == "MinGw" ]; then
if [ "$1" == "--release" ]; then
run=Builds/VisualStudio2017/x64/Release/App/NewMixer
else
run=Builds/VisualStudio2017/x64/Debug/App/NewMixer
fi
elif [ "${machine}" == "Mac" ]; then
if [ "$1" == "--release" ]; then
run=Builds/MacOSX/build/Release/NewMixer.app/Contents/MacOS/NewMixer
else
run=Builds/MacOSX/build/Debug/NewMixer.app/Contents/MacOS/NewMixer
fi
fi
# Get correct argument for mode
if [ "$1" != "--release" ]; then
mode=$1
else
mode=$2
fi
# select mode, and print
if [ "${mode}" != "" ]; then
if [ "${mode}" == "--unit-tests" ]; then
echo "Running NewMixer Unit Tests..."
elif [ "${mode}" == "Test" ]; then
echo "Running NewMixer Test Mode..."
elif [ "${mode}" == "Bridge" ]; then
echo "Running NewMixer Bridge Mode..."
elif [ "${mode}" == "Chorus" ]; then
echo "Running NewMixer JDWAS Mode..."
fi
${run} $1
else
${run}
fi