diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 20:16:55 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 20:16:55 +0000 |
| commit | 2d72446860abac08dc4f36b10fde7536f7897956 (patch) | |
| tree | 25dc114bb696bc8752d68e6e050da8d3dda5f282 /include/version.sh | |
| parent | 1cd73b4dadb8e618a0ec56289408922be42aac8a (diff) | |
More CMake work, mostly to handle both *nix and Windows builds.
Also some tweaks to generation files (like version.sh) to take both input and output files as arguments, to handle CMake when it's used for an out-of-source build.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1836 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/version.sh')
| -rw-r--r-- | include/version.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/version.sh b/include/version.sh index 962896e6b..77e2d5f3a 100644 --- a/include/version.sh +++ b/include/version.sh @@ -3,8 +3,8 @@ # Build version string and increment Services build number. # -if [ $# -lt 1 ] ; then - echo "Syntax: $0 <version.log>" +if [ $# -lt 2 ] ; then + echo "Syntax: $0 <version.log> <version.h>" exit 1 fi # Grab version information from the version control file. @@ -19,8 +19,9 @@ fi VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_EXTRA} (${VERSION_BUILD})" VERSIONDOTTED="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_EXTRA}.${VERSION_BUILD}" -if [ -f version.h ] ; then - BUILD=`fgrep '#define BUILD' version.h | cut -f2 -d\"` +VERSIONH="$2" +if [ -f $VERSIONH ] ; then + BUILD=`fgrep '#define BUILD' $VERSIONH | cut -f2 -d\"` BUILD=`expr $BUILD + 1 2>/dev/null` else BUILD=1 @@ -28,7 +29,7 @@ fi if [ ! "$BUILD" ] ; then BUILD=1 fi -cat >version.h <<EOF +cat >$VERSIONH <<EOF /* Version information for Services. * * (C) 2003-2008 Anope Team |
