summaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-12-12 18:40:04 -0500
committerAdam <Adam@anope.org>2010-12-12 18:40:04 -0500
commit7b7301eeffa22718588b118b53b80b6c5c139a29 (patch)
tree1bf8146dc94b4ee0b217574157077231c2f2f825 /Config
parent70d65376b7dea12ffbadbe5fbd6e616c00bc5733 (diff)
Made ./Config with a .git directory work ok if we are on a git tag
Diffstat (limited to 'Config')
-rwxr-xr-xConfig9
1 files changed, 7 insertions, 2 deletions
diff --git a/Config b/Config
index c647c8e54..fa35b2d43 100755
--- a/Config
+++ b/Config
@@ -166,8 +166,13 @@ if [ ! "$NO_INTRO" ] ; then
. $SOURCE_DIR/src/version.sh
if [ -d .git ] ; then
VERSION=`git describe --tags`
- echo "#define VERSION_BUILD `echo "$VERSION" | cut -d'-' -f2`" > include/version.h
- echo "#define VERSION_EXTRA \"-`echo "$VERSION" | cut -d'-' -f3`$VERSION_EXTRA\"" >> include/version.h
+ VERSION_BUILD=`echo "$VERSION" | cut -d'-' -f2`
+ VERSION_EXTRA=`echo "$VERSION" | cut -d'-' -f3`
+ if [ "$VERSION_BUILD" == "$VERSION_EXTRA" ] ; then
+ VERSION_EXTRA=""
+ fi
+ echo "#define VERSION_BUILD $VERSION_BUILD" > include/version.h
+ echo "#define VERSION_EXTRA \"$VERSION_EXTRA\"" >> include/version.h
fi
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
echo ""