diff --git a/pom.xml b/pom.xml
index 14c006bd..823a9032 100644
--- a/pom.xml
+++ b/pom.xml
@@ -144,6 +144,28 @@
maven-failsafe-plugin
2.22.2
+
+ org.apache.maven.plugins
+ maven-assembly-plugin
+ 3.3.0
+
+
+
+ jar-with-dependencies
+
+
+
+
+
+ make-assembly
+ package
+
+ single
+
+
+
+
+
diff --git a/quickstart.sh b/quickstart.sh
index c5d28393..38bf978a 100755
--- a/quickstart.sh
+++ b/quickstart.sh
@@ -4,6 +4,19 @@ set -o errexit
set -o pipefail
set -o nounset
+JAR="target/flatmap-0.1-SNAPSHOT-jar-with-dependencies.jar"
+
+echo "Downloading data..."
AREA="${1:-north-america_us_massachusetts}"
./scripts/download-osm.sh "${AREA}"
./scripts/download-other-sources.sh
+
+if [ ! -f "$JAR" ]; then
+ echo "Building..."
+ mvn -DskipTests=true package
+fi
+
+echo "Running..."
+java -Dinput="./data/sources/${AREA}.pbf" \
+ -cp "$JAR" \
+ com.onthegomap.flatmap.profiles.OpenMapTilesProfile
diff --git a/scripts/download-osm.sh b/scripts/download-osm.sh
index 199ed2ac..ddeac5aa 100755
--- a/scripts/download-osm.sh
+++ b/scripts/download-osm.sh
@@ -15,8 +15,9 @@ mkdir -p data/sources
LINK=$(echo "${1}" | tr '_' '/')
LINK="http://download.geofabrik.de/$LINK-latest.osm.pbf"
+OUT="${1}.pbf"
(
cd data/sources
- wget -N "${LINK}"
+ if [ ! -f "$OUT" ]; then wget -O "$OUT" "$LINK"; fi
)
diff --git a/scripts/download-other-sources.sh b/scripts/download-other-sources.sh
index 2d7bf685..7d1e4f6b 100755
--- a/scripts/download-other-sources.sh
+++ b/scripts/download-other-sources.sh
@@ -9,6 +9,6 @@ cd "$(git rev-parse --show-cdup)"
mkdir -p data/sources
cd data/sources
-wget -N https://naciscdn.org/naturalearth/packages/natural_earth_vector.sqlite.zip
-wget -N https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip
-wget -N https://github.com/lukasmartinelli/osm-lakelines/releases/download/v0.9/lake_centerline.shp.zip
+wget -nc https://naciscdn.org/naturalearth/packages/natural_earth_vector.sqlite.zip
+wget -nc https://osmdata.openstreetmap.de/download/water-polygons-split-3857.zip
+wget -nc https://github.com/lukasmartinelli/osm-lakelines/releases/download/v0.9/lake_centerline.shp.zip