Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=6c992e42bd6c177a260d5a615addddfff58eb563

commit 6c992e42bd6c177a260d5a615addddfff58eb563
Author: crazy <[EMAIL PROTECTED]>
Date:   Wed Feb 20 23:15:24 2008 +0100

sourceforge.sh
* make _F_sourceforge_sep work with empty values
* for that to work _F_sourceforge_sep="None" is needed in FrugalBuild
* Also documented that and fixes 2 other typos
* closes #2792

diff --git a/source/include/sourceforge.sh b/source/include/sourceforge.sh
index 7116e68..8bfcb42 100644
--- a/source/include/sourceforge.sh
+++ b/source/include/sourceforge.sh
@@ -39,11 +39,12 @@
# * _F_sourceforge_ext (defaults to .tar.gz): extension of the source tarball
# * _F_sourceforge_broken_up2date: if set, try an other method for up2date, try
# this if the normal up2date does not work, maybe this will
-# *_F_sourceforge_prefix (no defaults):  used to correct the up2date output
+# * _F_sourceforge_prefix (no defaults):  used to correct the up2date output
# As example $pkgver should be 1.2.3 but you get V1.2.3 in such a case you can
# set _F_sourceforge_prefix="V"
-# *_F_sourceforge_sep ( defaults to - ): used for source() only right now. As 
example
-# for an "baz_1.2.3.tar.gz" tarball you should use _F_sourceforge_sep="_"
+# * _F_sourceforge_sep ( defaults to - ): used for source() only right now. As 
example
+# for an "baz_1.2.3.tar.gz" tarball you should use _F_sourceforge_sep="_" , 
for empty
+# values use _F_sourceforge_sep="None" that way you can dowload such 
foo1234.tgz
###
if [ -z "$_F_sourceforge_name" ]; then
_F_sourceforge_name=$pkgname
@@ -70,6 +71,9 @@ if [ -z "$_F_sourceforge_sep" ]; then
_F_sourceforge_sep="-"
fi

+if [ -n "$_F_sourceforge_sep" ] && [ "$_F_sourceforge_sep" = "None" ]; then
+        _F_sourceforge_sep=""
+fi
###
# == OVERWRITTEN VARIABLES
# * url
@@ -82,4 +86,4 @@ if [ $_F_sourceforge_broken_up2date -eq 0 ]; then
else
up2date="lynx -dump 
http://sourceforge.net/project/showfiles.php?group_id=\$(lynx -dump $url|grep 
showfiles|sed 's/.*=\(.*\)/\1/;q')|grep -m1 
'$_F_sourceforge_name\(.*\)$_F_sourceforge_ext'|sed 
's/.*$_F_sourceforge_name$_F_sourceforge_prefix\(.*\)$_F_sourceforge_ext.*/\1/;s/-/_/g;s/_//1'"
fi
-source=(http://${_F_sourceforge_mirror}.dl.sourceforge.net/sourceforge/$_F_sourceforge_dirname/$_F_sourceforge_name$_F_sourceforge_sep${pkgver//_/-}$_F_sourceforge_ext)
+source=(http://${_F_sourceforge_mirror}.dl.sourceforge.net/sourceforge/${_F_sourceforge_dirname}/${_F_sourceforge_name}${_F_sourceforge_sep}${pkgver//_/-}${_F_sourceforge_ext})
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to