From 4623a87843c89dabe5409eeb53ba4b6388f7ccab Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Mon, 20 Aug 2018 00:39:32 +0000 Subject: [PATCH] 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 --- Tools/scripts/bump-revision.sh | 9 ++------- 1 file 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"