-
Notifications
You must be signed in to change notification settings - Fork 15
/
server.sh
executable file
·47 lines (33 loc) · 1.03 KB
/
server.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
#!/bin/bash
set -e
AUTORUN=$(cat AUTORUN)
PLATFORM=$(cat PLATFORM_OVERRIDE)
if [[ $PLATFORM != 1 ]] && [[ $PLATFORM != 5 ]]; then PLATFORM=${1-1}; fi
if [[ $PLATFORM != 1 ]] && [[ $PLATFORM != 5 ]]; then
echo "Usage: 1 for Linux (Default), 5 for XCompiling for Windows"
exit 1
fi
pushd .
cd "$(dirname "${0}")/.."
##### Configure and Make
cd OneLife/server
./configure $PLATFORM
make
cd ../..
##### Create Game Folder
mkdir -p output
cd output
FOLDERS="objects transitions categories tutorialMaps"
TARGET="."
LINK="../OneLifeData7"
../miniOneLifeCompile/util/createSymLinks.sh $PLATFORM "$FOLDERS" $TARGET $LINK
cp -rn ../OneLife/server/settings .
cp ../OneLife/server/firstNames.txt .
cp ../OneLife/server/lastNames.txt .
cp ../OneLife/server/wordList.txt .
cp ../OneLifeData7/dataVersionNumber.txt .
##### Copy to Game Folder and Run
if [[ $PLATFORM == 5 ]]; then mv ../OneLife/server/OneLifeServer.exe .; fi
if [[ $PLATFORM == 1 ]]; then mv ../OneLife/server/OneLifeServer .; fi
popd
if [[ $AUTORUN == 1 ]]; then ./runServer.sh; fi