#!/bin/sh if [ "$2" != "" ];then VERSION=`echo $2 | sed 's/rSVN_/ /' | (read a b; echo $a)` SVNVER=`echo $2 | sed 's/rSVN_/ /' | (read a b; echo $b)` else VERSION=$1 unset LANG FILE=/tmp/makeversion.tlmp if [ ! -f $FILE ] ; then svn status -u | grep -v "? " >$FILE fi NB=`cat $FILE | wc -l` SVNVER=`cat $FILE | grep against | (read a b c d; echo $d)` if [ "$NB" != 1 ] ; then SVNVER="$SVNVER+dev" fi fi echo "const char *linuxconf_version=\"$VERSION\";" >linuxconf-version.cc echo "const char *linuxconf_subversion=\"SVN_$SVNVER\";" >>linuxconf-version.cc echo ${VERSION}rSVN_$SVNVER >linuxconf-version g++ -c linuxconf-version.cc -o version.o rm -f linuxconf-version.cc