Move runtime artifacts out of the source tree to ~/trips

The dev directory now holds source code + compiled binaries only:
  ~/trips/osm/          OSM PBF extracts (was osm/, 1.4 GB)
  ~/trips/tilecache/    mock tile cache (was mock/.tilecache)
  ~/trips/store/mock/   per-trip uploads + chat logs (was mock/store, PII)
  ~/trips/logs/         server.log
  ~/trips/stale-osm-build/  stale source/tarball dup of ~/osm-build
                           (repo osm/build had no binaries; the live OSRM
                           toolchain + graphs already lived in ~/osm-build)

Code now points at the new locations, all overridable via env:
- mock/server.js: TRIPS_HOME (default ~/trips) for tile cache + store
- setup-osrm.sh / setup-osrm-colombia.sh: OSM_DIR (default ~/trips/osm)
- spatial/compose+import.sh: OSM_DIR (default ~/trips/osm)
- .gitignore: rewritten — no artifact paths remain in-tree
This commit is contained in:
gmp
2026-09-10 10:03:04 -04:00
parent c367eba5cb
commit 3da04c111e
9 changed files with 40 additions and 30 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Pre-cache OSM tiles for the trip's map extent through the local proxy
# (which stores them in mock/.tilecache). Usage:
# (the proxy stores them in ~/trips/tilecache). Usage:
# pre-cache-tiles.sh # all trips
# pre-cache-tiles.sh colombia z16 # one trip, one zoom
set -euo pipefail
@@ -60,4 +60,5 @@ for trip in "${TRIPS[@]}"; do
fetch "$trip" "$z" | xargs -P 8 -n 1 curl -s -o /dev/null -m 20 --retry 2 > /dev/null
done
done
echo "done. cache size: $(du -sh .tilecache | cut -f1)"
CACHE_DIR="${TRIPS_HOME:-$HOME/trips}/tilecache"
echo "done. cache size: $(du -sh "$CACHE_DIR" 2>/dev/null | cut -f1)"