diff --git a/tools/update_version_string.sh b/tools/update_version_string.sh index 23b213752..c3b4ff4aa 100755 --- a/tools/update_version_string.sh +++ b/tools/update_version_string.sh @@ -54,6 +54,25 @@ mv $TEMPFILE $MODIFYFILE ##### EmulationStation.h MODIFYFILE=../es-app/src/EmulationStation.h + +MODIFYSTRING=$(grep "PROGRAM_VERSION_MAJOR " $MODIFYFILE) +NEWSTRING="#define PROGRAM_VERSION_MAJOR ${1}" + +cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE +mv $TEMPFILE $MODIFYFILE + +MODIFYSTRING=$(grep "PROGRAM_VERSION_MINOR " $MODIFYFILE) +NEWSTRING="#define PROGRAM_VERSION_MINOR ${2}" + +cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE +mv $TEMPFILE $MODIFYFILE + +MODIFYSTRING=$(grep "PROGRAM_VERSION_MAINTENANCE " $MODIFYFILE) +NEWSTRING="#define PROGRAM_VERSION_MAINTENANCE ${3}" + +cat $MODIFYFILE | sed s/"${MODIFYSTRING}"/"${NEWSTRING}"/ > $TEMPFILE +mv $TEMPFILE $MODIFYFILE + MODIFYSTRING=$(grep "PROGRAM_VERSION_STRING" $MODIFYFILE) NEWSTRING="#define PROGRAM_VERSION_STRING \"${1}.${2}.${3}${SUFFIX}\""