2024-09-28 06:34:31 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
run_exe=0
|
|
|
|
|
2024-10-02 20:43:44 +00:00
|
|
|
if [ "$1" = "run" ]; then
|
2024-09-28 06:34:31 +00:00
|
|
|
run_exe=1
|
|
|
|
fi
|
|
|
|
|
2024-10-02 20:43:44 +00:00
|
|
|
if ! [ -f ".gitignore" ]; then
|
2024-09-28 06:34:31 +00:00
|
|
|
echo "Run in the project root"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p build
|
|
|
|
cd build || exit
|
|
|
|
|
2024-10-02 20:43:44 +00:00
|
|
|
cmake ..
|
2024-09-28 06:34:31 +00:00
|
|
|
make
|
|
|
|
|
|
|
|
if [ ${run_exe} -eq 1 ]; then
|
2024-10-04 05:05:43 +00:00
|
|
|
./server/simworld-daemon "$@"
|
2024-09-28 06:34:31 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd ..
|