aboutsummaryrefslogtreecommitdiffstats
path: root/rpmbuildupdate
diff options
context:
space:
mode:
authorMichael Scherer <misc@mandriva.com>2004-08-17 11:35:34 +0000
committerMichael Scherer <misc@mandriva.com>2004-08-17 11:35:34 +0000
commit49c43971b70a4df332cc7b704ada23a924d95981 (patch)
tree9470142035f872d2b06044110bad61ffbb0728b8 /rpmbuildupdate
parent2b7a985f912c4ba9df6d06dfbd4cf57a2d29e6ee (diff)
downloadbootsplash-49c43971b70a4df332cc7b704ada23a924d95981.tar
bootsplash-49c43971b70a4df332cc7b704ada23a924d95981.tar.gz
bootsplash-49c43971b70a4df332cc7b704ada23a924d95981.tar.bz2
bootsplash-49c43971b70a4df332cc7b704ada23a924d95981.tar.xz
bootsplash-49c43971b70a4df332cc7b704ada23a924d95981.zip
- better autodetection of sourceforge url.
Diffstat (limited to 'rpmbuildupdate')
-rwxr-xr-xrpmbuildupdate9
1 files changed, 7 insertions, 2 deletions
diff --git a/rpmbuildupdate b/rpmbuildupdate
index 2563fea..3d0fdc8 100755
--- a/rpmbuildupdate
+++ b/rpmbuildupdate
@@ -235,8 +235,13 @@ sub build
if(!$url[0])
{
- print "URL of sources was not found ! Trying to guess it with url tag ...\n";
- push(@url, $specvars{'url'}.'/'.$tar_ball)
+ print "URL of sources was not found ! Trying to guess it with url tag ...\n";
+ my $url=$specvars{'url'};
+ if ($url =~ m!http://(.*)\.((?:sourceforge|sf)\.net)/(.*)!)
+ {
+ $url="http://prdownloads.$2/$1/$3" unless $1 eq 'prdownloads';
+ }
+ push(@url, $url.'/'.$tar_ball)
}
$found = 0;