-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun
More file actions
executable file
·55 lines (44 loc) · 803 Bytes
/
Copy pathrun
File metadata and controls
executable file
·55 lines (44 loc) · 803 Bytes
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
if [[ ! -d "./obj/" ]]
then
mkdir ./obj/
fi
if [[ ! -d "./build/" ]]
then
mkdir ./build/
fi
if [[ ! -d "./bin/" ]]
then
mkdir ./bin/
fi
if [[ $1 = "" ]]
then
build="release"
else
build=$1
fi
if [[ $build = "asan" ]] || [[ $build = "debug" ]] || [[ $build = "release" ]]
then
echo ""
echo -e "\033[36mcompiling gitfluss...\033[0m"
echo ""
premake5 gmake
pushd ./build/ > /dev/null
make config=$build\_linux
else
echo -e "\033[31m\nERROR: invalid make config: '$build'.\033[0m"
exit -2;
fi
if [[ $? != 0 ]]
then
echo -e "\033[31m\nERROR: failed to compile gitfluss.\n\033[0m"
exit -1;
fi
echo -e "\n"
if [[ $2 = "--compile-only" ]]
then
exit 0;
fi
popd > /dev/null
chmod +x ./bin/$build/gitfluss
./bin/$build/gitfluss