Hopefully fix compilation on *BSD.
[librote.git] / make-package.sh
blobc8f2b58315ac452d1695d9e6dc78051f0f206fba
1 #!/bin/sh
3 if ! [ -f configure ]; then
4 echo "./configure does not exist. Run autoconf."
5 exit 1
6 fi
8 /bin/rm -rf autom4te.cache
10 X=`tempfile`
11 /bin/rm -f $X
12 mkdir $X
14 BASENAME=rote-`grep ^AC_INIT configure.ac | cut -d, -f2 | cut -d' ' -f2 | \
15 cut -d')' -f1 `
17 (cd .. && cp -a rote $X/$BASENAME)
18 (cd $X && find $X -name CVS -o -name '.git*' -exec rm -rf {} \; 2>/dev/null )
20 (cd $X && tar -zc $BASENAME) > ../$BASENAME.tar.gz
22 /bin/rm -rf $X
23 echo "../$BASENAME.tar.gz generated."