diff options
author | Christian Pointner <equinox@anytun.org> | 2010-01-24 20:28:35 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2010-01-24 20:28:35 +0000 |
commit | 1c87831cba055c78a5288f513679a781c1c62dd8 (patch) | |
tree | eb078da091a8f024c99209a7f9eebea3f5a777e0 /src/configure | |
parent | added setgpid at daemonize (diff) |
added --version parameter
Diffstat (limited to 'src/configure')
-rwxr-xr-x | src/configure | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/configure b/src/configure index 1f5f024..2c6d8ea 100755 --- a/src/configure +++ b/src/configure @@ -245,4 +245,33 @@ else echo "not installing example files" fi +VERSION=`cat ../version` +if which svn >/dev/null; then + SVN_REV=`svn info | grep "^Revision: " | awk '{print($2)}'` + if [ -n "$SVN_REV" ]; then + VERSION="$VERSION (svn$SVN_REV)" + fi +fi +HOSTNAME=`hostname` +DATE=`date +"%d.%m.%Y %H:%M:%S %Z"` + +cat >> version.h <<EOF +/* + * anytun version info + * + * this file was created automatically + * do not edit this file directly + * use ./configure instead + */ + +#ifndef ANYTUN_version_h_INCLUDED +#define ANYTUN_version_h_INCLUDED + +#define VERSION_STRING_0 " version $VERSION" +#define VERSION_STRING_1 "built on $HOSTNAME, $DATE" + +#endif + +EOF + exit 0 |