mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
Add files to automatically generate maps with Docker
Signed-off-by: zyphlar <zyphlar@gmail.com>
This commit is contained in:
17
tools/unix/update_planet.sh
Executable file
17
tools/unix/update_planet.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euxo pipefail
|
||||
|
||||
OSMUPDATE=~/osmctools/osmupdate
|
||||
# osmconvert should be accessible in PATH.
|
||||
PATH="$(dirname "$OSMUPDATE"):$PATH"
|
||||
|
||||
# Pass pbf or o5m file as a parameter
|
||||
OLD="$1"
|
||||
NEW="${1/.pbf/.new.pbf}"
|
||||
NEW="${NEW/.o5m/.new.o5m}"
|
||||
|
||||
"$OSMUPDATE" -v --drop-authors --drop-version --hash-memory=512000 "$OLD" "$NEW"
|
||||
# Uncomment to replace old planet.
|
||||
mv "$NEW" "$OLD"
|
||||
#md5sum -b "$OLD" > "$OLD.md5"
|
||||
echo "Successfully updated $OLD"
|
||||
Reference in New Issue
Block a user