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"