openpkg/release.sh

changeset 428
f880f219c566
parent 13
cb59d6afeb61
     1.1 --- a/openpkg/release.sh	Tue Jul 31 12:12:54 2012 +0200
     1.2 +++ b/openpkg/release.sh	Tue Jul 31 12:23:42 2012 +0200
     1.3 @@ -1,15 +1,14 @@
     1.4  #!@l_prefix@/lib/openpkg/bash
     1.5  ##
     1.6  ##  release -- OpenPKG Release Determination Utility
     1.7 -##  Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.8 -##  Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
     1.9 +##  Copyright (c) 2000-2012 OpenPKG GmbH <http://openpkg.com/>
    1.10  ##
    1.11 -##  Permission to use, copy, modify, and distribute this software for
    1.12 -##  any purpose with or without fee is hereby granted, provided that
    1.13 -##  the above copyright notice and this permission notice appear in all
    1.14 -##  copies.
    1.15 +##  This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
    1.16 +##  All rights reserved. Licenses which grant limited permission to use,
    1.17 +##  copy, modify and distribute this software are available from the
    1.18 +##  OpenPKG GmbH.
    1.19  ##
    1.20 -##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    1.21 +##  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
    1.22  ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    1.23  ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    1.24  ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    1.25 @@ -76,9 +75,10 @@
    1.26          -e 's;^X *TAG *= *\([^ ][^ ]*\).*;\1;' \
    1.27          -e '/^X/d' | \
    1.28          sed -n -e '$p'`
    1.29 -else
    1.30 +fi
    1.31 +if [ ".$tag" = . ]; then
    1.32      tag=`$prefix/bin/openpkg rpm \
    1.33 -        -q --qf '%{VERSION}\n' openpkg | number_to_tag`
    1.34 +        -q --qf '%{RELEASE}\n' openpkg | number_to_tag`
    1.35  fi
    1.36  if [ .`echo ".$tag" | sed -e 's;^\.;;' | tag_sanity` = .ERROR ]; then
    1.37      echo "openpkg:release: WARNING: unable to determine OpenPKG release tag" 1>&2
    1.38 @@ -95,14 +95,14 @@
    1.39          sed -n -e '$p'`
    1.40  fi
    1.41  if [ ".$url" = . ]; then
    1.42 -    url="ftp://ftp.openpkg.org/*"
    1.43 +    url="http://download.openpkg.org/stacks/*"
    1.44  fi
    1.45  case ".$url" in
    1.46      */\* )
    1.47          url=`echo ".$url" | sed -e 's;^\.;;' -e 's;/\*$;;'`
    1.48          case "$tag" in
    1.49              CURRENT )
    1.50 -                url="$url/current/SRC/"
    1.51 +                url="$url/current/"
    1.52                  ;;
    1.53              CURRENT-* )
    1.54                  version=`echo "$tag" | sed -e 's;^CURRENT-;;'`
    1.55 @@ -128,6 +128,10 @@
    1.56                  version=`echo "$tag" | sed -e 's;^\(.*\)-RELEASE$;\1;'`
    1.57                  url="$url/release/$version/"
    1.58                  ;;
    1.59 +            * )
    1.60 +                subdir=`echo "$tag" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    1.61 +                url="$url/$subdir/"
    1.62 +                ;;
    1.63          esac
    1.64          ;;
    1.65  esac

mercurial