ports/checkportstree: syntax tweak for pushd/popd errors caused by find duplicates

This commit is contained in:
Matt Housh 2019-06-07 13:48:18 -05:00
parent f0f4e2ad9c
commit 84b2b37056
1 changed files with 3 additions and 2 deletions

View File

@ -64,8 +64,9 @@ outdated_pkg() {
outdated() {
local prt otd
for prt in $(cat $ALL_PKGS); do
pushd $(find -L $PORTS_DIR -maxdepth 2 -name $prt -type d) > /dev/null
otd="$otd $(outdated_pkg)"
pushd */$prt > /dev/null
O="$(outdated_pkg)"
[ -n "$O" ] && otd="$otd $O"
popd > /dev/null
done
print_result "Outdated" "$otd"