Module: ngircd.git Branch: master Commit: d7d5f4330b15667d9f364ebabd886a062b2741fb URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d7d5f...
Author: Alexander Barton alex@barton.de Date: Mon Sep 24 18:00:36 2012 +0200
configure.ng: don't require GIT tree to detect version string
---
configure.ng | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/configure.ng b/configure.ng index 25654f9..da723e8 100644 --- a/configure.ng +++ b/configure.ng @@ -9,7 +9,12 @@ # Please read the file COPYING, README and AUTHORS for more information. #
-define(VERSION_ID,esyscmd(git describe|sed -e 's/rel-//g'|sed -e 's/-/~/'|tr -d \n)) +define(VERSION_ID,esyscmd([ + V=`git describe 2>/dev/null | sed -e 's/rel-//g' | sed -e 's/-/~/'`; + [ -z "$V" -a -r configure ] \ + && V=`grep "PACKAGE_STRING=" configure | cut -d"'" -f2 | cut -d' ' -f2` + ( [ -n "$V" ] && echo "$V" || echo "??" ) | tr -d '\n'; +]))
# -- Initialisation --