abstreet/precompute.sh
Dustin Carlino fd273ae62d woops, i broke fix_map_geom when deferring remove_disconnected_roads.
also update install instructions to prep for hackathon
2019-09-19 11:44:52 -07:00

30 lines
640 B
Bash
Executable File

#!/bin/bash
set -e
release_mode=""
psrc_scenarios=""
for arg in "$@"; do
if [ "$arg" == "--release" ]; then
release_mode="--release";
elif [ "$arg" == "--disable_psrc_scenarios" ]; then
psrc_scenarios="--disable_psrc_scenarios";
else
# Just recompute a single map.
cd precompute;
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$arg.bin $psrc_scenarios;
cd ..;
exit;
fi
done
mkdir -p data/maps/
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 $psrc_scenarios;
cd ..;
done