-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetupWorkspace
More file actions
executable file
·66 lines (61 loc) · 1.83 KB
/
setupWorkspace
File metadata and controls
executable file
·66 lines (61 loc) · 1.83 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
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
#########################################################################################
##
## CivCraft git initialiser script for Unix
##
#########################################################################################
printMessage ( ) {
echo
echo " $*"
}
tryExecute ( ) {
echo " --$*"
$*
EXIT_CODE=$?
echo
if [ $EXIT_CODE != 0 ] ; then
echo " Failed with code "$EXIT_CODE", exiting..."
exit 1
else
echo " Completed with exit code $?"
fi
}
if [ "$1" = "build" ] ; then
printMessage "Building the jar files of CivCraft"
else
printMessage "Setting up CivCraft for development"
fi
printMessage "Initialising submodules..."
tryExecute "git submodule init"
printMessage "Updating submodules..."
tryExecute "git submodule update"
printMessage "Setting up AlexIILLib..."
cd ./AlexIILLib/
tryExecute "./gradlew setupCIWorkspace"
printMessage "Building AlexIILLib..."
tryExecute "./gradlew build"
cd ..
printMessage "Setting Up CivCraft..."
if [ "$1" = "build" ]; then
tryExecute "./gradlew setupCIWorkspace"
printMessage "Building CivCraft..."
tryExecute "./gradlew build"
if [ "$2" = "version" ]; then
printMessage "Setting up Version Info..."
git clone https://github.com/AlexIIL/VersionInfo.git
printMessage "Building version Info..."
cd VersionInfo
tryExecute "./gradlew build"
cd build/libs
printMessage "Running Version Info..."
tryExecute "java -jar VersionInfo.jar AlexIIL CivCraft"
fi
printMessage "Build Complete!"
else
tryExecute "./gradlew setupDecompWorkspace"
printMessage "Generating Eclipse Workspace Files..."
tryExecute "./gradlew eclipse"
printMessage "Generating Idea Project Files"
tryExecute "./gradlew idea"
printMessage "Setup complete!"
fi