diff --git a/utils/setVersionNumber.sh b/utils/setVersionNumber.sh index ae14a97..ce73d42 100755 --- a/utils/setVersionNumber.sh +++ b/utils/setVersionNumber.sh @@ -20,10 +20,10 @@ oldversion=`cat VERSION` echo "Changing version from $oldversion to $version" -sed -i "s/__version__ = '$oldversion'/__version__ = '$version'/g" python/src/__init__.py +sed -i'.bak' "s/__version__ = '$oldversion'/__version__ = '$version'/g" python/src/__init__.py -sed -i "s/Version: $oldversion/Version: $version/g" distro/rpm/*.spec -sed -i "s/ ($oldversion-/ ($version-/g" distro/debian/changelog +sed -i'.bak' "s/Version: $oldversion/Version: $version/g" distro/rpm/*.spec +sed -i'.bak' "s/ ($oldversion-/ ($version-/g" distro/debian/changelog oldmajor=`echo $oldversion | cut -d "." -f 1` oldminor=`echo $oldversion | cut -d "." -f 2` @@ -32,13 +32,13 @@ major=`echo $version | cut -d "." -f 1` minor=`echo $version | cut -d "." -f 2` patch=`echo $version | cut -d "." -f 3` -sed -i "s/CPACK_PACKAGE_VERSION_MAJOR $oldmajor/CPACK_PACKAGE_VERSION_MAJOR $major/g" CMakeLists.txt -sed -i "s/CPACK_PACKAGE_VERSION_MINOR $oldminor/CPACK_PACKAGE_VERSION_MINOR $minor/g" CMakeLists.txt +sed -i'.bak' "s/CPACK_PACKAGE_VERSION_MAJOR $oldmajor/CPACK_PACKAGE_VERSION_MAJOR $major/g" CMakeLists.txt +sed -i'.bak' "s/CPACK_PACKAGE_VERSION_MINOR $oldminor/CPACK_PACKAGE_VERSION_MINOR $minor/g" CMakeLists.txt number_of_dots=`grep -o '\.' <<< $version | wc -l` if test $number_of_dots -ge 2 then - sed -i "s/set ( CPACK_PACKAGE_VERSION_PATCH $oldpatch/set ( CPACK_PACKAGE_VERSION_PATCH $patch/g" CMakeLists.txt + sed -i'.bak' "s/set ( CPACK_PACKAGE_VERSION_PATCH $oldpatch/set ( CPACK_PACKAGE_VERSION_PATCH $patch/g" CMakeLists.txt fi echo $version > VERSION