File indexing completed on 2024-11-03 05:13:00

0001 #!/bin/sh
0002 
0003 # Usage:
0004 #
0005 #   make-release-tarball.sh <VERSION>
0006 #
0007 # Can be run from any directory.
0008 
0009 version=$1
0010 
0011 cmddir=`dirname $0`
0012 
0013 if test -z "$version"; then
0014     version=$(cat $cmddir/../VERSION)
0015     echo "Version number: $version (from VERSION)"
0016 else
0017     echo $version >VERSION
0018     echo "Version number: $version (manually given)"
0019 fi
0020 
0021 pkgname=pology-$version
0022 
0023 echo "Creating tarball directory..."
0024 tdir=/tmp/$pkgname
0025 rm -rf $tdir
0026 cp -r $cmddir/.. $tdir
0027 # All following actions happen in tarball directory.
0028 cd $tdir
0029 
0030 echo "Removing non-distributed files..."
0031 find -iname \.svn | xargs rm -rf
0032 find -iname \*.pyc | xargs rm -rf
0033 find -iname \*.sdc | xargs rm -rf
0034 rm -rf build
0035 rm -rf doc-html
0036 rm -rf mo
0037 rm -rf www
0038 
0039 echo "Making tarball..."
0040 cd ..
0041 pkgpath=`dirname $tdir`/$pkgname.tar.bz2
0042 tar -cjf $pkgpath $pkgname
0043 
0044 echo "Tarball ready at: $pkgpath"