source: branches/samba-3.5.x/lib/tdb/release-script.sh@ 836

Last change on this file since 836 was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.1 KB
Line 
1#!/bin/bash
2
3if [ "$1" = "" ]; then
4 echo "Please provide version string, eg: 1.2.0"
5 exit 1
6fi
7
8if [ ! -d "lib/tdb" ]; then
9 echo "Run this script from the samba base directory."
10 exit 1
11fi
12
13git clean -f -x -d lib/tdb
14git clean -f -x -d lib/replace
15
16curbranch=`git branch |grep "^*" | tr -d "* "`
17
18version=$1
19strver=`echo ${version} | tr "." "-"`
20
21# Checkout the release tag
22git branch -f tdb-release-script-${strver} tdb-${strver}
23if [ ! "$?" = "0" ]; then
24 echo "Unable to checkout tdb-${strver} release"
25 exit 1
26fi
27
28git checkout tdb-release-script-${strver}
29
30# Test configure agrees with us
31confver=`grep "^AC_INIT" lib/tdb/configure.ac | tr -d "AC_INIT(tdb, " | tr -d ")"`
32if [ ! "$confver" = "$version" ]; then
33 echo "Wrong version, requested release for ${version}, found ${confver}"
34 exit 1
35fi
36
37# Now build tarball
38cp -a lib/tdb tdb-${version}
39cp -a lib/replace tdb-${version}/libreplace
40pushd tdb-${version}
41./autogen.sh
42popd
43tar cvzf tdb-${version}.tar.gz tdb-${version}
44rm -fr tdb-${version}
45
46#Clean up
47git checkout $curbranch
48git branch -d tdb-release-script-${strver}
Note: See TracBrowser for help on using the repository browser.