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
This commit is contained in:
parent
c2839dee80
commit
4623a87843
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=477615
1 changed files with 2 additions and 7 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue