Extend DOP download scripts to fetch worldfiles and XML

This commit is contained in:
2025-12-15 21:37:43 +01:00
parent 4a85b63f28
commit 114b41573e
2 changed files with 24 additions and 16 deletions

View File

@@ -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"

View File

@@ -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"