aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2018-08-19 09:17:56 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2018-08-19 09:17:56 +0000
commit8c7bf827a625d77f087b180b217aa4230596bad0 (patch)
tree15bdad9f2b8a3198e284877620c987baecd2cd3c /Tools
parent43451923712b330009daeff42ff08bb47fe0d60e (diff)
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/bump-revision.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tools/scripts/bump-revision.sh b/Tools/scripts/bump-revision.sh
index 55d6ea6b2282..f5afa58776f2 100755
--- a/Tools/scripts/bump-revision.sh
+++ b/Tools/scripts/bump-revision.sh
@@ -48,6 +48,12 @@ trap "rm -f $tempfile" 0 1 2 3 15
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 @@ do
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"