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
|
|
|
|
echo "Unknown argument $arg";
|
|
|
|
exit 1;
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2018-10-20 18:35:07 +03:00
|
|
|
mkdir -p data/maps/
|
|
|
|
|
2019-04-11 21:10:40 +03:00
|
|
|
# Re-export all synthetic maps from scratch. Do this before the other loop,
|
|
|
|
# since the raw_map might be stale.
|
|
|
|
cd precompute;
|
|
|
|
for path in `ls ../data/synthetic_maps/*`; do
|
|
|
|
RUST_BACKTRACE=1 cargo run $release_mode $path;
|
|
|
|
done
|
|
|
|
cd ..;
|
|
|
|
|
2018-10-20 18:35:07 +03:00
|
|
|
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
|