2019-02-15 05:45:42 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
release_mode=""
|
|
|
|
name=""
|
|
|
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
if [ "$arg" == "--release" ]; then
|
|
|
|
release_mode="--release";
|
|
|
|
else
|
|
|
|
name=$arg;
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ "$name" == "" ]; then
|
|
|
|
echo "Pass a map name";
|
|
|
|
exit;
|
|
|
|
fi
|
|
|
|
|
|
|
|
# TODO Argh, copied code! Need to detangle all the scripts.
|
|
|
|
|
2019-04-13 01:34:28 +03:00
|
|
|
rm -rf data/neighborhoods/$name;
|
2019-02-15 05:45:42 +03:00
|
|
|
|
|
|
|
cd convert_osm;
|
|
|
|
RUST_BACKTRACE=1 cargo run $release_mode -- \
|
|
|
|
--osm=../data/input/$name.osm \
|
|
|
|
--clip=../data/polygons/$name.poly \
|
2019-06-11 23:47:12 +03:00
|
|
|
--output=../data/raw_maps/$name.bin
|
2019-02-15 05:45:42 +03:00
|
|
|
|
|
|
|
cd ../precompute;
|
2019-06-11 23:47:12 +03:00
|
|
|
RUST_BACKTRACE=1 cargo run $release_mode ../data/raw_maps/$name.bin;
|