#!/bin/sh # # Build version string and increment Services build number. # # Grab version information from the version control file. CTRL="../version.log" if [ -f $CTRL ] ; then . $CTRL else echo "Error: Unable to find control file: $CTRL" exit 0 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 | sed 's/^#define BUILD.*\([0-9]*\).*$/\1/'` BUILD=`expr $BUILD + 1 2>/dev/null` else BUILD=1 fi if [ ! "$BUILD" ] ; then BUILD=1 fi cat >version.h <= 1400 # define VER_OS "W" # else # define VER_OS "w" # endif #else # define VER_OS #endif #if defined(USE_MYSQL) # define VER_MYSQL "Q" #else # define VER_MYSQL #endif #if defined(USE_MODULES) # define VER_MODULE "M" #else # define VER_MODULE #endif #endif EOF