summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2018-08-20 00:39:32 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2018-08-20 00:39:32 +0000
commit4623a87843c89dabe5409eeb53ba4b6388f7ccab (patch)
tree7275c09d8bffc6c3ff9245c3cf6fff270ee20e2c /Tools
parentupdate sysutils/ansible25 to 2.5.8 (diff)
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
Notes
Notes: svn path=/head/; revision=477615
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/bump-revision.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/Tools/scripts/bump-revision.sh b/Tools/scripts/bump-revision.sh
index f5afa58776f2..1997e76dd894 100755
--- a/Tools/scripts/bump-revision.sh
+++ b/Tools/scripts/bump-revision.sh
@@ -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"