]> git.saurik.com Git - wxWidgets.git/commitdiff
more informative output
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Jan 2007 22:26:44 +0000 (22:26 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 7 Jan 2007 22:26:44 +0000 (22:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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`