Add opt-in insecure TLS mode to dop20 downloader
This commit is contained in:
@@ -16,6 +16,12 @@ fi
|
||||
|
||||
mkdir -p "$OUT_JP2" "$OUT_J2W" "$OUT_META"
|
||||
|
||||
DOP20_CURL_OPTS=()
|
||||
if [[ "${DOP20_INSECURE:-}" == "1" ]]; then
|
||||
DOP20_CURL_OPTS+=("-k")
|
||||
echo "Warning: DOP20_INSECURE=1 set — skipping TLS verification." >&2
|
||||
fi
|
||||
|
||||
while IFS= read -r url; do
|
||||
[[ -z "$url" || "$url" =~ ^# ]] && continue
|
||||
fname="${url##*/}"
|
||||
@@ -30,7 +36,7 @@ while IFS= read -r url; do
|
||||
continue
|
||||
fi
|
||||
echo "Downloading $fname"
|
||||
curl -fL "$url" -o "$dest"
|
||||
curl -fL "${DOP20_CURL_OPTS[@]}" "$url" -o "$dest"
|
||||
done < "$LIST"
|
||||
|
||||
echo "Done. Files in $OUT_JP2, $OUT_J2W, $OUT_META"
|
||||
|
||||
Reference in New Issue
Block a user