diff options
author | Brian J. Tarricone <brian@tarricone.org> | 2009-08-18 18:56:54 -0700 |
---|---|---|
committer | Brian J. Tarricone <brian@tarricone.org> | 2009-08-18 18:56:54 -0700 |
commit | f88cea5e782a0496186d42f469782882cac34a7c (patch) | |
tree | cafd665fdf9795e3f44f65395fb7489ae6878214 /autogen.sh | |
parent | 37d405679d49f9bff0fdc1d70cff9ea560c08222 (diff) | |
download | xfce4-dev-tools-f88cea5e782a0496186d42f469782882cac34a7c.tar.gz |
use git for revision substitution
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -9,26 +9,23 @@ # # substitute revision and date -if test -d .git/svn; then - revision=$(git svn find-rev trunk 2>/dev/null || - git svn find-rev origin/trunk 2>/dev/null || - git svn find-rev HEAD 2>/dev/null || - git svn find-rev master 2>/dev/null) -else - revision=`LC_ALL=C svn info $0 | awk '/^Revision: / {printf "%05d\n", $2}'` +if test -d .git; then + revision=$(git rev-parse --short HEAD) +fi +if test "x$revision" = "x"; then + revision=UNKNOWN fi -sed -e "s/@DATE@/`date +%Y%m%d`/g" -e "s/@REVISION@/${revision}/g" \ - < "configure.in.in" > "configure.in" +sed -e "s/@REVISION@/${revision}/g" < "configure.in.in" > "configure.in" if (type xdt-autogen) >/dev/null 2>&1; then - exec xdt-autogen $@ + exec xdt-autogen "$@" else (aclocal && automake --add-missing --copy --gnu && autoconf) || exit 1 if test x"${NOCONFIGURE}" = x""; then - (./configure --enable-maintainer-mode $@ && + (./configure --enable-maintainer-mode "$@" && echo "Now type \"make\" to build.") || exit 1 else echo "Skipping configure process." |