Allow question marks in URL...

svn path=/nixpkgs/trunk/; revision=15507
This commit is contained in:
Michael Raskin 2009-05-08 17:00:33 +00:00
parent fb54c95889
commit f067828cdc

View File

@ -73,6 +73,9 @@ tryHashedMirrors() {
} }
# URL list may contain ?. No glob expansion for that, please
set -o noglob
urls2= urls2=
for url in $urls; do for url in $urls; do
if test "${url:0:9}" != "mirror://"; then if test "${url:0:9}" != "mirror://"; then
@ -102,6 +105,8 @@ for url in $urls; do
done done
urls="$urls2" urls="$urls2"
# Restore globbing settings
set +o noglob
if test -n "$showURLs"; then if test -n "$showURLs"; then
echo "$urls" > $out echo "$urls" > $out
@ -113,12 +118,18 @@ if test -n "$preferHashedMirrors"; then
tryHashedMirrors tryHashedMirrors
fi fi
# URL list may contain ?. No glob expansion for that, please
set -o noglob
success= success=
for url in $urls; do for url in $urls; do
tryDownload "$url" tryDownload "$url"
if test -n "$success"; then finish; fi if test -n "$success"; then finish; fi
done done
# Restore globbing settings
set +o noglob
if test -z "$preferHashedMirrors"; then if test -z "$preferHashedMirrors"; then
tryHashedMirrors tryHashedMirrors
fi fi