]> git.saurik.com Git - wxWidgets.git/blobdiff - misc/scripts/inc_release
extract the list of macros to ignore in a separate file and completed it with FWD...
[wxWidgets.git] / misc / scripts / inc_release
index f151d1073417ff9bce12516f821ef41868e6edec..46b364f40f5539764af872431dce31274b4d7fe4 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`
@@ -58,7 +73,8 @@ ver_for_sed="$ver_major\.$ver_minor\.$ver_release"
 
 run_sed include/wx/version.h \
     "s/^\(#define wxRELEASE_NUMBER *\) $ver_release$/\1 $ver_release_new/" \
-    "s/^\(#define wxSUBRELEASE_NUMBER *\) [0-9]\{1,\}$/\1 0/"
+    "s/^\(#define wxSUBRELEASE_NUMBER *\) [0-9]\{1,\}$/\1 0/" \
+    "/^#define wxVERSION_STRING/s/$ver_for_sed/$ver_string_new/"
 
 run_sed configure.in \
     "/^AC_INIT/s/$ver_for_sed/$ver_string_new/" \
@@ -69,4 +85,6 @@ for f in *.spec; do
     run_sed $f "/^%define *ver/s/$ver_for_sed/$ver_string_new/"
 done
 
+run_sed docs/latex/wx/manual.tex \
+    "/^\\\\\\\\title/s/$ver_for_sed/$ver_string_new/"
 run_sed build/script/win_docs.bat "/SET WXW_VER=/s/$ver_for_sed/$ver_string_new/"