3 # a simple shell script which allows to bump the LIB_REVISION and LIB_DATE information
4 # found in a specified source code file
7 if [ "$1" = "all" ]; then
8 find .
-maxdepth 3 -name "version.h" -exec $0 {} \
;
11 foundrev
=`grep "#define LIB_REVISION " $1`
13 founddate
=`grep "#define LIB_DATE " $1`
15 newrev
=`echo $foundrev | awk '{ print $1" "$2" "$3+1 }'`
16 curdate
=`date +%d.%m.%Y`
17 newdate
=`echo "#define LIB_DATE \"${curdate}\""`
18 sed -i "s/${foundrev}/${newrev}/g" $1
19 sed -i "s/${founddate}/${newdate}/g" $1