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