-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
46 lines (42 loc) · 1 KB
/
build.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
#!/bin/bash
# Builds retail and classic, and then junctions the resulting files from .release to the respective wow folders.
# Paths to the junction tool and WoW folder specified in /.release/.env
# Process command-line options
usage() {
echo "Usage: build.sh [-d]" >&2
echo " -c Builds classic only and junctions into classic wow." >&2
echo " -d Enable Dev mode. Doesn't build, junctions directly to retail." >&2
}
exit_code=0
while getopts ":cd" opt; do
case $opt in
c)
classicOnly="true"
;;
d)
devmode="true"
;;
\?)
if [ "$OPTARG" != "?" ] && [ "$OPTARG" != "h" ]; then
echo "Unknown option \"-$OPTARG\"." >&2
fi
usage
exit 1
;;
esac
done
if [ $devmode ]; then
(cd .release; ./devmode.sh)
echo
echo "Dev mode enabled."
else
if [ $classicOnly ]; then
(cd .release; ./build_classic.sh)
else
(cd .release; ./build_retail.sh)
#(cd .release; ./build_classic.sh) # Classic freezing for now.
fi
echo
echo "Build complete."
fi
exit $exit_code