From: Vadim Zeitlin Date: Sun, 7 Jan 2007 22:26:44 +0000 (+0000) Subject: more informative output X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7bf325389e0447b51228ecbd4d4fb9f97cf975d6 more informative output git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/misc/scripts/inc_release b/misc/scripts/inc_release index f151d10734..6cdee25372 100755 --- a/misc/scripts/inc_release +++ b/misc/scripts/inc_release @@ -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`