Initial addition of exclude plugin
[matthijs/upstream/blosxom-plugins.git] / make-dist
1 #!/bin/sh
2 #
3 # Quick script to make a flattened tarball (unix)
4 #
5
6 cd `dirname $0`
7
8 NAME=blosxom-plugins
9 VERSION=`cat VERSION`
10
11 test -d $NAME-$VERSION && rm -rf $NAME-$VERSION
12 mkdir $NAME-$VERSION
13
14 find * \( -name $NAME-$VERSION -o -name CVS \) -prune -o -type f -exec cp -p {} $NAME-$VERSION \;
15
16 # Prune unwanted files
17 for i in make-dist README.cvs; do
18   rm -f $NAME-$VERSION/$i
19 done
20
21 # Create tarball
22 which tar >/dev/null 2>&1
23 if [ $? == 0 ]; then
24   echo "Creating $NAME-$VERSION.tar.gz"
25   tar -zcf $NAME-$VERSION.tar.gz $NAME-$VERSION
26 fi
27
28 # Create zip file
29 which zip >/dev/null 2>&1
30 if [ $? == 0 ]; then
31   echo "Creating $NAME-$VERSION.zip"
32   zip -q -r $NAME-$VERSION.zip $NAME-$VERSION 
33 fi
34
35 test -d $NAME-$VERSION && rm -rf $NAME-$VERSION
36