-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.sh
executable file
·57 lines (46 loc) · 1.69 KB
/
ci.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
50
51
52
53
54
55
56
57
#!/bin/bash
mkdir -p "$DEPENDENCIES"
cd "$DEPENDENCIES"
if [ ! -f "$GARRYSMOD_COMMON/premake5.lua" ]; then
echo "garrysmod_common directory is empty, doing git clone of the remote repo";
git clone --recursive https://github.com/danielga/garrysmod_common.git;
else
echo "garrysmod_common directory is good, pulling any latest changes";
cd "$GARRYSMOD_COMMON";
git pull;
git submodule update --init --recursive;
fi
cd "$DEPENDENCIES"
if [ ! -f "$SOURCE_SDK/LICENSE" ]; then
echo "sourcesdk-minimal directory is empty, doing git clone of the remote repo";
git clone https://github.com/danielga/sourcesdk-minimal.git;
else
echo "sourcesdk-minimal directory is good, pulling any latest changes";
cd "$SOURCE_SDK";
git pull;
fi
cd "$DEPENDENCIES"
if [ ! -f "$DEPENDENCIES/premake-core/premake5.lua" ]; then
echo "premake-core directory is empty, doing git clone of the remote repo";
git clone --recursive https://github.com/premake/premake-core.git;
else
echo "premake-core directory is good, pulling any latest changes";
cd "$DEPENDENCIES/premake-core";
git pull;
git submodule update --init --recursive;
fi
mkdir -p "$DEPENDENCIES/$PROJECT_OS"
if [ ! -f "$PREMAKE5" ]; then
echo "premake-core directory is empty, bootstrapping";
cd "$DEPENDENCIES/premake-core";
make -f Bootstrap.mak "$TARGET_OS";
cd "$DEPENDENCIES";
mkdir -p "$DEPENDENCIES/$PROJECT_OS/premake-core";
cp "$DEPENDENCIES/premake-core/bin/release/premake5" "$DEPENDENCIES/$PROJECT_OS/premake-core";
fi
cd "$REPOSITORY_DIR/projects"
"$PREMAKE5" gmake
cd "$REPOSITORY_DIR/projects/$PROJECT_OS/gmake"
make
cp "$REPOSITORY_DIR/projects/$PROJECT_OS/gmake/release/"gm*_${MODULE_NAME}_$TARGET_OS.dll "$REPOSITORY_DIR"
cd "$REPOSITORY_DIR"