From 44216c2ef81fb7eeb1d0c25d2dcf8652714c9798 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 23 Jun 2010 04:58:07 +0000 Subject: [PATCH] Use an SF version extractor with better chances to yield correct result by default svn path=/nixpkgs/trunk/; revision=22390 --- pkgs/build-support/upstream-updater/snippets.sh | 1 + pkgs/build-support/upstream-updater/update-upstream-data.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/upstream-updater/snippets.sh b/pkgs/build-support/upstream-updater/snippets.sh index dad25384568a..2c06696c928f 100644 --- a/pkgs/build-support/upstream-updater/snippets.sh +++ b/pkgs/build-support/upstream-updater/snippets.sh @@ -4,6 +4,7 @@ #http://downloads.sourceforge.net/webdruid/files/webdruid/0.6.0-alpha5/webdruid-0.6.0-alpha5.tar.gz skipRedirectSF='s@sourceforge.net/projects@downloads.sourceforge.net/project@; s@/files@@; s@/download$@@;' extractReleaseSF='s@.*/([^/]+)/[^/]+@\1@' +extractVersionSF='s@.*/[^/0-9]*([0-9].*)[.](tar|tgz|tbz2|zip).*@\1@' apacheMirror='s@http://www.apache.org/dist/@mirror://apache/@' skipRedirectApache='s@/dyn/closer.cgi[?]path=@/dist@' diff --git a/pkgs/build-support/upstream-updater/update-upstream-data.sh b/pkgs/build-support/upstream-updater/update-upstream-data.sh index ac23029bc738..fc44264d9f62 100755 --- a/pkgs/build-support/upstream-updater/update-upstream-data.sh +++ b/pkgs/build-support/upstream-updater/update-upstream-data.sh @@ -56,8 +56,8 @@ prefetchClause="" echo "Sourceforge-corrected URL: $freshUrl" >&2 version="$(echo "$freshUrl" | - sed -re "$extractReleaseSF")" - baseName="$(getAttr baseName "$(echo "$freshUrl" | sed -re 's@.*/projects/([^/]+)/.*@\1@')")" + sed -re "$extractVersionSF")" + baseName="$(getAttr baseName "$(echo "$freshUrl" | sed -re 's@.*/project/([^/]+)/.*@\1@')")" url="$freshUrl" name="$baseName-$version" advertisedUrl="$freshUrl"