2021-02-15 22:06:28 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# This script imports scenarios an actdev site that's already been imported.
|
|
|
|
# It's run manually once per site.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-02-25 05:18:12 +03:00
|
|
|
CITY=$1
|
|
|
|
if [ "$CITY" == "" ]; then
|
2021-02-15 22:06:28 +03:00
|
|
|
echo Missing args;
|
|
|
|
exit 1;
|
|
|
|
fi
|
2021-02-25 05:18:12 +03:00
|
|
|
SITE=`echo $CITY | sed -r 's/_/-/g'`
|
2021-02-15 22:06:28 +03:00
|
|
|
|
2021-02-16 00:26:44 +03:00
|
|
|
rm -fv *.json
|
2021-02-25 05:18:12 +03:00
|
|
|
wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/scenario_base.json
|
|
|
|
wget https://raw.githubusercontent.com/cyipt/actdev/main/data-small/$SITE/scenario_go_active.json
|
2021-02-15 22:06:28 +03:00
|
|
|
|
2021-02-25 05:18:12 +03:00
|
|
|
cargo run --release --bin import_traffic -- --map=data/system/gb/$CITY/maps/center.bin --input=scenario_base.json --skip_problems
|
|
|
|
cargo run --release --bin import_traffic -- --map=data/system/gb/$CITY/maps/center.bin --input=scenario_go_active.json --skip_problems
|
2021-02-16 00:26:44 +03:00
|
|
|
rm -fv *.json
|