[Lunar-commits] r15888 - in lunar: branches/stable/var/lib/lunar/functions trunk/var/lib/lunar/functions
Auke Kok
sofar at lunar-linux.org
Wed Jul 27 07:24:39 UTC 2005
Author: sofar
Date: 2005-07-27 07:24:37 +0000 (Wed, 27 Jul 2005)
New Revision: 15888
Modified:
lunar/branches/stable/var/lib/lunar/functions/download.lunar
lunar/trunk/var/lib/lunar/functions/download.lunar
Log:
Bugfix: the '/' at the end of a URL may be missing like in the case of mirrors. You should account for BOTH situations. This forces proper termination of any URL.
Modified: lunar/branches/stable/var/lib/lunar/functions/download.lunar
===================================================================
--- lunar/branches/stable/var/lib/lunar/functions/download.lunar 2005-07-27 04:09:26 UTC (rev 15887)
+++ lunar/branches/stable/var/lib/lunar/functions/download.lunar 2005-07-27 07:24:37 UTC (rev 15888)
@@ -35,9 +35,7 @@
download_url() {
local RETVAL
- local CLEAN_URL
debug_msg "download_url($@)"
- CLEAN_URL=`echo $1 | sed "s:\([^:]/\)/*:\1:g"`
verbose_msg "trying to download \"$CLEAN_URL\""
connect &&
plugin_call SOURCE_DOWNLOAD $CLEAN_URL $2 $3
@@ -85,7 +83,8 @@
add_url() {
if [ -n "$1" ]; then
if ! echo " $ALL_URLS " | grep -q " $1 "; then
- ALL_URLS="$ALL_URLS $1"
+ # make sure the URL has ONE "/" at the end
+ ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:\([^:]/\)/*:\1:g")"
fi
fi
}
Modified: lunar/trunk/var/lib/lunar/functions/download.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/download.lunar 2005-07-27 04:09:26 UTC (rev 15887)
+++ lunar/trunk/var/lib/lunar/functions/download.lunar 2005-07-27 07:24:37 UTC (rev 15888)
@@ -35,9 +35,7 @@
download_url() {
local RETVAL
- local CLEAN_URL
debug_msg "download_url($@)"
- CLEAN_URL=`echo $1 | sed "s:\([^:]/\)/*:\1:g"`
verbose_msg "trying to download \"$CLEAN_URL\""
connect &&
plugin_call SOURCE_DOWNLOAD $CLEAN_URL $2 $3
@@ -85,7 +83,8 @@
add_url() {
if [ -n "$1" ]; then
if ! echo " $ALL_URLS " | grep -q " $1 "; then
- ALL_URLS="$ALL_URLS $1"
+ # make sure the URL has ONE "/" at the end
+ ALL_URLS="$ALL_URLS $(echo "$1/" | sed "s:\([^:]/\)/*:\1:g")"
fi
fi
}
More information about the Lunar-commits
mailing list