mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-27 16:36:02 +03:00
22db36c0f4
cuts prep time down to reasonable levels for everything.
35 lines
727 B
Bash
Executable File
35 lines
727 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
release_mode=""
|
|
for arg in "$@"; do
|
|
if [ "$arg" == "--release" ]; then
|
|
release_mode="--release";
|
|
else
|
|
# Just recompute a single map.
|
|
cd precompute;
|
|
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$arg.bin;
|
|
cd ..;
|
|
exit;
|
|
fi
|
|
done
|
|
|
|
mkdir -p data/maps/
|
|
|
|
# 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 ..;
|
|
|
|
for map_path in `ls data/raw_maps/`; do
|
|
map=`basename $map_path .bin`;
|
|
echo "Precomputing $map";
|
|
cd precompute;
|
|
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$map.bin;
|
|
cd ..;
|
|
done
|