#!/bin/bash set -e TRANSIT_DIR=$DATA_DIR NETWORK_DIR=$NETWORK_CACHE_DIR BUILD_DIR="$NETWORK_DIR/build" # If no cached network yet, copy transit data to a writable location for the build. # R5 writes temp files (.mapdb) next to the OSM/GTFS files during network construction. if [ ! -f "$NETWORK_DIR/network.dat" ]; then echo "No cached network — copying transit data to writable build dir..." mkdir -p "$BUILD_DIR" cp "$OSM_DIR"/*.osm.pbf "$BUILD_DIR/" 2>/dev/null || true cp "$TRANSIT_DIR"/*.zip "$BUILD_DIR/" 2>/dev/null || true export DATA_DIR="$BUILD_DIR" fi exec java -Xmx16g -cp "out:lib/*" propertymap.App