makepkg: allow spaces in source file names

The download command failed with sources that contained spaces.
Remainder of fix for FS#15323.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2009-07-12 01:07:46 +10:00
parent caa0f2205a
commit 104daa16a6

View file

@ -323,17 +323,17 @@ download_file() {
# replace %o by the temporary dlfile if it exists # replace %o by the temporary dlfile if it exists
if echo "$dlcmd" | grep -q "%o" ; then if echo "$dlcmd" | grep -q "%o" ; then
dlcmd=${dlcmd//\%o/$file.part} dlcmd=${dlcmd//\%o/\"$file.part\"}
dlfile="$file.part" dlfile="$file.part"
fi fi
# add the url, either in place of %u or at the end # add the url, either in place of %u or at the end
if echo "$dlcmd" | grep -q "%u" ; then if echo "$dlcmd" | grep -q "%u" ; then
dlcmd=${dlcmd//\%u/$url} dlcmd=${dlcmd//\%u/\"$url\"}
else else
dlcmd="$dlcmd $url" dlcmd="$dlcmd \"$url\""
fi fi
$dlcmd || return $? eval $dlcmd || return $?
# rename the temporary download file to the final destination # rename the temporary download file to the final destination
if [ "$dlfile" != "$file" ]; then if [ "$dlfile" != "$file" ]; then