add missing file from 3.0
[ira/wip.git] / make-tarball.sh
1 #!/bin/sh
2
3 ## A simple script to build a tarball of the current CVS tree.
4 ## You either need to include the using_samba cvs module in the
5 ## parent directory or tell the script where to find it 
6 ##
7 ## Usgae:  ./make-tarball.sh
8
9 USING_SAMBA=../using_samba/
10 SRCDIR=`pwd`
11
12 if [ ! -d $USING_SAMBA ]; then
13
14         echo Cannot find "Using Samba" directory \(assuming $USING_SAMBA\).  
15         echo Please set the USING_SAMBA variable in this script to the correct
16         echo location.  The html files are available in the using_samba CVS 
17         echo module on cvs.samba.org.  See http://cvs/samba.org/ for details 
18         echo about anonymous CVS access.  Exiting now....
19
20         exit 1
21
22 fi
23
24 VERSION=`grep SAMBA_VERSION_OFFICIAL_STRING source/include/version.h | cut -d\" -f2 | sed 's/ /_/g'`
25 TARBALLDIR=/tmp/samba-$VERSION
26
27 echo Creating the tarball source directory in $TARBALLDIR
28
29 /bin/rm -rf $TARBALLDIR
30 /bin/rm -f samba-$VERSION.tar
31
32 mkdir $TARBALLDIR
33 rsync -aC ./ $TARBALLDIR
34 rsync -aC $USING_SAMBA $TARBALLDIR/docs/htmldocs/
35
36 echo Creating packaging scripts...
37 ( cd $TARBALLDIR/packaging; sh bin/update-pkginfo $VERSION 1 )
38
39 echo Creating source/configure...
40 ( cd $TARBALLDIR/source; ./autogen.sh )
41
42 echo Making tarball samba-$VERSION.tar in current directory...
43 ( cd `dirname $TARBALLDIR`; tar cf $SRCDIR/samba-$VERSION.tar samba-$VERSION )