diff --git a/autogen.sh b/autogen.sh index 6bb4f292..bb4b2cc0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,17 +2,21 @@ # $Id$ # autogen.sh -# optional $1 = full path to svn local working repository +# optional $1 = full path to svn working copy or "clean" AUTOCONF=${AUTOCONF:-autoconf} AUTOMAKE=${AUTOMAKE:-automake} ACLOCAL=${ACLOCAL:-aclocal} AUTOHEADER=${AUTOHEADER:-autoheader} LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} -WORKINGREPO=${1:-.} + +if [ "$1" == "clean" ]; then + /bin/rm -f configure.ac + exit 0 +fi # substitute svn revision -revision=`LC_ALL=C svn info ${WORKINGREPO} | awk '/^Revision: / {printf "%05d\n", $2}'` +revision=`LC_ALL=C svn info $1 | awk '/^Revision: / {printf "%05d\n", $2}'` sed -e "s/@REVISION@/${revision}/g" \ < "configure.ac.in" > "configure.ac"