diff options
author | Sumit Bose <sbose@redhat.com> | 2011-11-17 11:21:08 -0500 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-11-22 14:40:19 +0100 |
commit | ac748b45ed70cf11a6c5adb75aacc8ea86f62971 (patch) | |
tree | 421ce5cb995a12bce8797430d3a80e9e58aa79f2 /mktarball.sh | |
parent | 4b05f30414b9258fac54a963080c243b599648a1 (diff) | |
download | samba4-ac748b45ed70cf11a6c5adb75aacc8ea86f62971.tar.gz samba4-ac748b45ed70cf11a6c5adb75aacc8ea86f62971.tar.xz samba4-ac748b45ed70cf11a6c5adb75aacc8ea86f62971.zip |
Changes for automatic build
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'mktarball.sh')
-rwxr-xr-x | mktarball.sh | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/mktarball.sh b/mktarball.sh index f1f8ed9..e352f6c 100755 --- a/mktarball.sh +++ b/mktarball.sh @@ -1,30 +1,17 @@ #!/bin/bash -dir="samba-4.0" -date=`date +%y%m%d%H%M%S` -hash="" +dir=".." -rm -f samba-4.0*.tar.bz2 -rm -f ~/rpmbuild/SOURCES/samba-4.0*.tar.bz2 +rm -f samba-4.0.tar.bz2 -cd $dir -git fetch && git reset --hard origin/master || exit 0 -hash=`git show --abbrev-commit --pretty=format:"%h" | head -1` -cd .. +git archive --remote ${dir} --prefix=samba-4.0/ origin/master | bzip2 > samba-4.0.tar.bz2 -samba_version=${date}git${hash} -tar cfj samba-4.0-$samba_version.tar.bz2 --exclude=.git $dir - -cp samba-4.0-$samba_version.tar.bz2 ~/rpmbuild/SOURCES - -talloc_version=`grep ^VERSION $dir/lib/talloc/wscript | cut -d "'" -f 2` -tevent_version=`grep ^VERSION $dir/lib/tevent/wscript | cut -d "'" -f 2` -tdb_version=`grep ^VERSION $dir/lib/tdb/wscript | cut -d "'" -f 2` -ldb_version=`grep ^VERSION $dir/lib/ldb/wscript | cut -d "'" -f 2` +talloc_version=`grep ^VERSION ${dir}/lib/talloc/wscript | cut -d "'" -f 2` +tevent_version=`grep ^VERSION ${dir}/lib/tevent/wscript | cut -d "'" -f 2` +tdb_version=`grep ^VERSION ${dir}/lib/tdb/wscript | cut -d "'" -f 2` +ldb_version=`grep ^VERSION ${dir}/lib/ldb/wscript | cut -d "'" -f 2` sed --in-place s/^%define\ talloc_version.*/%define\ talloc_version\ $talloc_version/ samba40.spec sed --in-place s/^%define\ tevent_version.*/%define\ tevent_version\ $tevent_version/ samba40.spec sed --in-place s/^%define\ tdb_version.*/%define\ tdb_version\ $tdb_version/ samba40.spec sed --in-place s/^%define\ ldb_version.*/%define\ ldb_version\ $ldb_version/ samba40.spec - -sed --in-place s/^%define\ samba_version.*/%define\ samba_version\ $samba_version/ samba40.spec |