Last change
on this file since 498 was
470,
checked in by price, 17 years ago
|
use reprepro more correctly
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[16] | 1 | #!/bin/bash |
---|
[464] | 2 | svnuri=`svn info /srv/checkout | sed -n 's/^Repository Root: //p'` |
---|
[10] | 3 | |
---|
| 4 | set -e |
---|
| 5 | if [ $# -ne 1 ] ; then |
---|
[466] | 6 | echo " usage: sx-build-release package_name" |
---|
[10] | 7 | exit 1 |
---|
| 8 | fi |
---|
| 9 | |
---|
| 10 | package=$1 |
---|
[466] | 11 | rm -rf build-release/$package |
---|
| 12 | svn export $svnuri/trunk/packages/$package build-release/$package |
---|
| 13 | cd build-release/$package |
---|
[464] | 14 | |
---|
[16] | 15 | eval `perl '-F:\s+' -lane 'print $F[0]."=".$F[1] if /^Version|^Source|^Distribution/' \ |
---|
| 16 | <(dpkg-parsechangelog)` |
---|
[10] | 17 | |
---|
[464] | 18 | dpkg-buildpackage -us -uc -rfakeroot |
---|
[16] | 19 | |
---|
[464] | 20 | if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then |
---|
| 21 | svn mkdir $svnuri/package_tags/$Source \ |
---|
| 22 | -m "Create package tags directory" |
---|
| 23 | fi |
---|
| 24 | if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then |
---|
[466] | 25 | svn cp $svnuri/trunk/packages/$package $svnuri/package_tags/$Source/$Version \ |
---|
[464] | 26 | -m "Tag $Version of $Source" |
---|
| 27 | else |
---|
| 28 | echo "$(basename $0): tag already exists, not making again" |
---|
| 29 | fi |
---|
| 30 | |
---|
[25] | 31 | cd .. |
---|
[470] | 32 | [ $Distribution = 'unstable' ] \ |
---|
| 33 | || echo "$(basename $0): warning: Distribution is ${Distribution}, script expects unstable" |
---|
| 34 | changesfile=`pwd`/${Source}_*${Version}*.changes |
---|
| 35 | reprepro-env include unstable $changesfile |
---|
| 36 | reprepro-env copy stable unstable ${Source} \ |
---|
| 37 | $(perl '-F:\s+' -lane 'print $F[1]." " if /^Binary/' <$changesfile) |
---|
[10] | 38 | |
---|
[466] | 39 | cd .. |
---|
[10] | 40 | rm -rf build-release |
---|
Note: See
TracBrowser
for help on using the repository browser.