simworld/build.sh

27 lines
272 B
Bash
Raw Normal View History

2024-09-28 06:34:31 +00:00
#!/bin/sh
set -e
run_exe=0
if [ "$1" = "run" ]; then
2024-09-28 06:34:31 +00:00
run_exe=1
fi
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
cmake ..
2024-09-28 06:34:31 +00:00
make
if [ ${run_exe} -eq 1 ]; then
./server/simworld-daemon
2024-09-28 06:34:31 +00:00
fi
cd ..