]> git.saurik.com Git - wxWidgets.git/blobdiff - misc/scripts/inc_release
more informative output
[wxWidgets.git] / misc / scripts / inc_release
index f151d1073417ff9bce12516f821ef41868e6edec..6cdee25372e9e38c321956837b718548f1e6b055 100755 (executable)
@@ -17,6 +17,14 @@ msg() {
     echo "$progname: $*"
 }
 
+msgn() {
+    echo -n "$progname: $*"
+}
+
+msgc() {
+    echo "$*"
+}
+
 run_sed() {
     filename=$1
     shift
@@ -26,8 +34,15 @@ run_sed() {
         shift
     done
 
-    msg "      updating $filename"
-    eval "sed -i $cmd $filename"
+    msgn "     processing $filename ...        "
+    eval "sed $cmd $filename" > $filename.$$
+    if cmp -s $filename $filename.$$; then
+        rm $filename.$$
+        msgc "unchanged"
+    else
+        mv $filename.$$ $filename
+        msgc "done"
+    fi
 }
 
 progname=`basename $0`