From 114b41573e78cd27e6b9738a6e0650be7387d20d Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Mon, 15 Dec 2025 21:37:43 +0100 Subject: [PATCH] Extend DOP download scripts to fetch worldfiles and XML --- raw/dop/dlscript.sh | 20 ++++++++++++-------- raw_dop/dlscript.sh | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/raw/dop/dlscript.sh b/raw/dop/dlscript.sh index e88048c..27d1870 100755 --- a/raw/dop/dlscript.sh +++ b/raw/dop/dlscript.sh @@ -15,14 +15,18 @@ mkdir -p "$OUT" while IFS= read -r url; do [[ -z "$url" || "$url" =~ ^# ]] && continue - fname="${url##*/}" - dest="$OUT/$fname" - if [[ -f "$dest" ]]; then - echo "Exists: $fname" - continue - fi - echo "Downloading $fname" - curl -fL "$url" -o "$dest" + for ext in .jp2 .j2w .xml; do + base="${url%.*}" + target_url="${base}${ext}" + fname="${target_url##*/}" + dest="$OUT/$fname" + if [[ -f "$dest" ]]; then + echo "Exists: $fname" + continue + fi + echo "Downloading $fname" + curl -fL "$target_url" -o "$dest" + done done < "$LIST" echo "Done. Files in $OUT" diff --git a/raw_dop/dlscript.sh b/raw_dop/dlscript.sh index e88048c..27d1870 100755 --- a/raw_dop/dlscript.sh +++ b/raw_dop/dlscript.sh @@ -15,14 +15,18 @@ mkdir -p "$OUT" while IFS= read -r url; do [[ -z "$url" || "$url" =~ ^# ]] && continue - fname="${url##*/}" - dest="$OUT/$fname" - if [[ -f "$dest" ]]; then - echo "Exists: $fname" - continue - fi - echo "Downloading $fname" - curl -fL "$url" -o "$dest" + for ext in .jp2 .j2w .xml; do + base="${url%.*}" + target_url="${base}${ext}" + fname="${target_url##*/}" + dest="$OUT/$fname" + if [[ -f "$dest" ]]; then + echo "Exists: $fname" + continue + fi + echo "Downloading $fname" + curl -fL "$target_url" -o "$dest" + done done < "$LIST" echo "Done. Files in $OUT"