This repository was archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·55 lines (44 loc) · 1.46 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·55 lines (44 loc) · 1.46 KB
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
#! /bin/bash
# automatic setup script for TowerWarZ
# Modification to this setup script is NOT Allowed.
# May result in broken build environment
# DO NOT pull request to edit this script.
# Collaborators, we need your help to NOT accept pull requests that change file setup.sh
# UNLESS @xiurobert explicitly allows it
# Do not touch these
WRK_SETUPSCRIPT=`pwd`/setup.sh
TWZ_VER=Dev
#If user wants help
if [ $1 = "--help" ];
then
echo "Usage: $WRK_SETUPSCRIPT [ --custom-mvn <maven_location> ]"
echo "Items within [] are optional"
exit 0;
fi
# If user does not specify a maven location
if [ $1 = "--custom-mvn" ] && [ $2 = "" ];
then
echo "<maven_location> is not specified! Exiting..."
exit 1;
fi
# If user uses default maven location in $PATH
if [ $1 = "" ];
then
command -v mvn >/dev/null 2>&1 || {
echo >&2 "Maven is not found on the system. Setup cannot be completed";
exit 1;
}
echo "[Setup] Building TowerWarZ v$TWZ_VER"
if mvn clean install ; then
echo "[Setup] Succesfully built TWZ v$TWZ_VER"
echo "[Setup] Will now exit"
exit 0;
else
echo "[Setup] Failed to build TWZ v$TWZ_VER"
echo "[Setup] Please check the maven log for more details."
echo "[Setup] If there is indeed a bug in the software and not the code, please file an issue at "
echo "https://github.com/xiurobert/TowerWarZ/issues with your maven log trace."
echo "Exiting..."
exit 1;
fi
fi