Extend DOP download scripts to fetch worldfiles and XML
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user