git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44145
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
echo "$progname: $*"
}
+msgn() {
+ echo -n "$progname: $*"
+}
+
+msgc() {
+ echo "$*"
+}
+
run_sed() {
filename=$1
shift
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`