-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathvmap
executable file
·55 lines (49 loc) · 1.23 KB
/
vmap
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/sh
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
PATH="$SCRPATH"/bin:"$PATH"
if [ ! -f "$SCRPATH"/bin/vmap ]; then
printf "Map compiler is not present, please run build_editor.sh\n"
exit
fi
# Check how many cores/processors we should use for building
if ! [ -x "$(command -v nproc)" ]; then
# check if we're on OpenBSD then
if ! [ -x "$(command -v sysctl)" ]; then
BUILD_PROC=1
else
BUILD_PROC=$(sysctl -n hw.ncpu)
fi
else
BUILD_PROC=$(nproc)
fi
set -e
if [ "$VMAP_NOBSP" != "1" ]; then
"$SCRPATH"/bin/vmap -v -custinfoparms -fs_basepath "$SCRPATH" -fs_game platform -threads $BUILD_PROC $*
fi
if [ "$VMAP_NOVIS" != "1" ]; then
if [ "$VMAP_FASTVIS" != "1" ]; then
"$SCRPATH"/bin/vmap -vis -v -fs_basepath "$SCRPATH" -fs_game platform $*
else
"$SCRPATH"/bin/vmap -vis -v -fast -fs_basepath "$SCRPATH" -fs_game platform $*
fi
fi
if [ "$VMAP_NOLIGHT" != "1" ]; then
if [ "$VMAP_FASTLIGHT" != "1" ]; then
"$SCRPATH"/bin/vmap -light \
-custinfoparms \
-fs_basepath "$SCRPATH" \
-v \
-fs_game platform \
-threads $BUILD_PROC \
$*
else
"$SCRPATH"/bin/vmap -light \
-custinfoparms \
-fs_basepath "$SCRPATH" \
-v \
-fs_game platform \
-threads $BUILD_PROC \
-fast \
$*
fi
fi