Index: Tools/scripts/bump-revision.sh =================================================================== --- Tools/scripts/bump-revision.sh (revision 466223) +++ Tools/scripts/bump-revision.sh (working copy) @@ -48,6 +48,12 @@ while [ $# -gt 0 ] do if [ -f "$1/Makefile" ]; then + # See what the port thinks its PORTREVISION is and save that. + startdir=`pwd` + cd "$1" + pre=$(make -V PORTREVISION) + cd "$startdir" + # If the Makefile exists, continue and empty the tempfile, set up variables echo -n > $tempfile revision_str=`grep "^PORTREVISION?\?=" "$1/Makefile"` @@ -92,6 +98,15 @@ if ! grep -q "^PORTREVISION?\?=" $1/Makefile; then printc "ERROR: $1 PORTREVISION not found and failed to add it!" "red" fi + + # See what the port now has for PORTREVISION. + cd "$1" + post=$(make -V PORTREVISION) + cd "$startdir" + + if [ "$post" -le "$pre" ]; then + printc "ERROR: $1 PORTREVISION went backwards from $pre to $post!" "red" + fi ;; *) printc "ERROR: PORTREVISION grep for $1 exited with error!" "red"