Make it possible to change machine account sids
[Samba.git] / lib / tdb / release-script.sh
blob95d4238657b1a4ab746a8bfe59fd856fb4a06db4
1 #!/bin/bash
3 if [ "$1" = "" ]; then
4 echo "Please provide version string, eg: 1.2.0"
5 exit 1
6 fi
8 if [ ! -d "lib/tdb" ]; then
9 echo "Run this script from the samba base directory."
10 exit 1
13 curbranch=`git-branch |grep "^*" | tr -d "* "`
15 version=$1
16 strver=`echo ${version} | tr "." "-"`
18 # Checkout the release tag
19 git branch -f tdb-release-script-${strver} tdb-${strver}
20 if [ ! "$?" = "0" ]; then
21 echo "Unable to checkout tdb-${strver} release"
22 exit 1
25 git checkout tdb-release-script-${strver}
27 # Test configure agrees with us
28 confver=`grep "^AC_INIT" lib/tdb/configure.ac | tr -d "AC_INIT(tdb, " | tr -d ")"`
29 if [ ! "$confver" = "$version" ]; then
30 echo "Wrong version, requested release for ${version}, found ${confver}"
31 exit 1
34 # Now build tarball
35 cp -a lib/tdb tdb-${version}
36 cp -a lib/replace tdb-${version}/libreplace
37 pushd tdb-${version}
38 ./autogen.sh
39 popd
40 tar cvzf tdb-${version}.tar.gz tdb-${version}
41 rm -fr tdb-${version}
43 #Clean up
44 git checkout $curbranch
45 git branch -d tdb-release-script-${strver}