2018-10-20 18:35:07 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-02-18 01:56:17 +03:00
|
|
|
set -e
|
2018-10-20 18:35:07 +03:00
|
|
|
|
2018-12-20 23:15:58 +03:00
|
|
|
release_mode=""
|
|
|
|
for arg in "$@"; do
|
|
|
|
if [ "$arg" == "--release" ]; then
|
|
|
|
release_mode="--release";
|
|
|
|
else
|
2019-06-18 01:44:10 +03:00
|
|
|
# Just recompute a single map.
|
|
|
|
cd precompute;
|
|
|
|
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$arg.bin;
|
|
|
|
cd ..;
|
|
|
|
exit;
|
2018-12-20 23:15:58 +03:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2018-10-20 18:35:07 +03:00
|
|
|
mkdir -p data/maps/
|
|
|
|
|
|
|
|
for map_path in `ls data/raw_maps/`; do
|
2019-06-11 23:47:12 +03:00
|
|
|
map=`basename $map_path .bin`;
|
2019-03-19 01:15:14 +03:00
|
|
|
echo "Precomputing $map";
|
2019-01-11 07:56:15 +03:00
|
|
|
cd precompute;
|
2019-06-11 23:47:12 +03:00
|
|
|
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$map.bin;
|
2019-01-11 07:56:15 +03:00
|
|
|
cd ..;
|
2018-10-20 18:35:07 +03:00
|
|
|
done
|