aboutsummaryrefslogtreecommitdiff
path: root/maintainer-scripts/update_version
diff options
context:
space:
mode:
Diffstat (limited to 'maintainer-scripts/update_version')
-rwxr-xr-xmaintainer-scripts/update_version32
1 files changed, 19 insertions, 13 deletions
diff --git a/maintainer-scripts/update_version b/maintainer-scripts/update_version
index bb94944710a..ff29928be2e 100755
--- a/maintainer-scripts/update_version
+++ b/maintainer-scripts/update_version
@@ -45,23 +45,29 @@ for BRANCH in $BRANCHES; do
for file in $textstring_FILES; do
if test -f $file; then
- OLD_VERSION=`/bin/cat $file`
- /bin/sed -e "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <<HERE
-$OLD_VERSION
-HERE
-
- COMMIT_FILES="$COMMIT_FILES $file"
+ /bin/sed <$file >$file.new -e \
+ "s/\(.*\"[^ ]*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/"
+
+ if /usr/bin/cmp -s $file $file.new; then
+ rm -f $file.new
+ else
+ mv -f $file.new $file
+ COMMIT_FILES="$COMMIT_FILES $file"
+ fi
fi
done
for file in $cppdefine_FILES; do
- if test -f $file; then
- OLD_VERSION=`/bin/cat $file`
- /bin/sed -e "s/\(#.*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/" >${file} <<HERE
-$OLD_VERSION
-HERE
-
- COMMIT_FILES="$COMMIT_FILES $file"
+ if test -f $file; then
+ /bin/sed <$file >$file.new -e \
+ "s/\(#.*\) [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]/\1 ${CURR_DATE}/"
+
+ if /usr/bin/cmp -s $file $file.new; then
+ rm -f $file.new
+ else
+ mv -f $file.new $file
+ COMMIT_FILES="$COMMIT_FILES $file"
+ fi
fi
done