#!/bin/bash

VERSION_FILE_PATH=$1

COUNTER_1=`cat $VERSION_FILE_PATH | grep 'PROJECT_VERSION_BUILD_NO ' | awk {'print $3'}`
#echo $COUNTER_1
COUNTER_2=`echo $COUNTER_1+1|bc`
#echo $COUNTER_2
sed -e '/^#define PROJECT_VERSION_BUILD_NO / s/PROJECT_VERSION_BUILD_NO.*/PROJECT_VERSION_BUILD_NO '${COUNTER_2}'/' $VERSION_FILE_PATH > $VERSION_FILE_PATH.tmp
rm -f $VERSION_FILE_PATH
mv $VERSION_FILE_PATH.tmp $VERSION_FILE_PATH


