diff -r 71503088f51b -r f880f219c566 openpkg/release.sh --- a/openpkg/release.sh Tue Jul 31 12:12:54 2012 +0200 +++ b/openpkg/release.sh Tue Jul 31 12:23:42 2012 +0200 @@ -1,15 +1,14 @@ #!@l_prefix@/lib/openpkg/bash ## ## release -- OpenPKG Release Determination Utility -## Copyright (c) 2000-2007 OpenPKG Foundation e.V. -## Copyright (c) 2000-2007 Ralf S. Engelschall +## Copyright (c) 2000-2012 OpenPKG GmbH ## -## Permission to use, copy, modify, and distribute this software for -## any purpose with or without fee is hereby granted, provided that -## the above copyright notice and this permission notice appear in all -## copies. +## This software is property of the OpenPKG GmbH, DE MUC HRB 160208. +## All rights reserved. Licenses which grant limited permission to use, +## copy, modify and distribute this software are available from the +## OpenPKG GmbH. ## -## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR @@ -76,9 +75,10 @@ -e 's;^X *TAG *= *\([^ ][^ ]*\).*;\1;' \ -e '/^X/d' | \ sed -n -e '$p'` -else +fi +if [ ".$tag" = . ]; then tag=`$prefix/bin/openpkg rpm \ - -q --qf '%{VERSION}\n' openpkg | number_to_tag` + -q --qf '%{RELEASE}\n' openpkg | number_to_tag` fi if [ .`echo ".$tag" | sed -e 's;^\.;;' | tag_sanity` = .ERROR ]; then echo "openpkg:release: WARNING: unable to determine OpenPKG release tag" 1>&2 @@ -95,14 +95,14 @@ sed -n -e '$p'` fi if [ ".$url" = . ]; then - url="ftp://ftp.openpkg.org/*" + url="http://download.openpkg.org/stacks/*" fi case ".$url" in */\* ) url=`echo ".$url" | sed -e 's;^\.;;' -e 's;/\*$;;'` case "$tag" in CURRENT ) - url="$url/current/SRC/" + url="$url/current/" ;; CURRENT-* ) version=`echo "$tag" | sed -e 's;^CURRENT-;;'` @@ -128,6 +128,10 @@ version=`echo "$tag" | sed -e 's;^\(.*\)-RELEASE$;\1;'` url="$url/release/$version/" ;; + * ) + subdir=`echo "$tag" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + url="$url/$subdir/" + ;; esac ;; esac