svn commit: r477615 - head/Tools/scripts
Gerald Pfeifer
gerald at FreeBSD.org
Mon Aug 20 00:39:33 UTC 2018
Author: gerald
Date: Mon Aug 20 00:39:32 2018
New Revision: 477615
URL: https://svnweb.freebsd.org/changeset/ports/477615
Log:
Use 'make -C' instead of saving the current working directory and then
restoring that in the new code to add a safety belt that came in via
revision 477561. This is quite a bit simpler and shorter.
Reported by: adamw
PR: 226926
Modified:
head/Tools/scripts/bump-revision.sh
Modified: head/Tools/scripts/bump-revision.sh
==============================================================================
--- head/Tools/scripts/bump-revision.sh Mon Aug 20 00:38:40 2018 (r477614)
+++ head/Tools/scripts/bump-revision.sh Mon Aug 20 00:39:32 2018 (r477615)
@@ -49,10 +49,7 @@ 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"
+ pre=$(make -C "$1" -V PORTREVISION)
# If the Makefile exists, continue and empty the tempfile, set up variables
echo -n > $tempfile
@@ -100,9 +97,7 @@ do
fi
# See what the port now has for PORTREVISION.
- cd "$1"
- post=$(make -V PORTREVISION)
- cd "$startdir"
+ post=$(make -C "$1" -V PORTREVISION)
if [ "$post" -le "$pre" ]; then
printc "ERROR: $1 PORTREVISION went backwards from $pre to $post!" "red"
More information about the svn-ports-all
mailing list