source: trunk/packages/sipb-xen-dev/sx-build-release @ 464

Last change on this file since 464 was 464, checked in by price, 17 years ago

some cleanup of sx-build-release

  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[16]1#!/bin/bash
[464]2svnuri=`svn info /srv/checkout | sed -n 's/^Repository Root: //p'`
[10]3
4set -e
5if  [ $# -ne 1 ] ; then
6        echo " usage: sx-build-release trunk/packages/package_name"
7        exit 1
8fi
9
10if [ -d build-release ] ; then
11    echo "a previous build release directory exists; please clean up"
12    exit 1
13    fi
14
15package=$1
[317]16svn export $svnuri/$package build-release/`basename $package`
[10]17olddir=`pwd`
18cd build-release/`basename $package`
[464]19
[16]20eval  `perl '-F:\s+' -lane 'print  $F[0]."=".$F[1] if /^Version|^Source|^Distribution/' \
21    <(dpkg-parsechangelog)`
[10]22
[464]23dpkg-buildpackage -us -uc -rfakeroot
[16]24
[464]25if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then
26  svn mkdir $svnuri/package_tags/$Source \
27      -m "Create package tags directory"
28fi
29if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then
30  svn cp $svnuri/$package $svnuri/package_tags/$Source/$Version \
31      -m "Tag $Version of $Source"
32else
33  echo "$(basename $0): tag already exists, not making again"
34fi
35
[25]36cd ..
[464]37reprepro-env include $Distribution  `pwd`/${Source}_*${Version}*.changes
[10]38
39cd $olddir
40rm -rf build-release
Note: See TracBrowser for help on using the repository browser.