The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c5e30fbdb7e066a6207084f7a8f2327aafe9104e
commit c5e30fbdb7e066a6207084f7a8f2327aafe9104e Author: Jessica Clarke <[email protected]> AuthorDate: 2022-08-09 21:57:22 +0000 Commit: Jessica Clarke <[email protected]> CommitDate: 2022-08-09 21:57:22 +0000 etcupdate: Prefer POSIX -depth to BSD -d This is in preparation for building an etcupdate tree on non-FreeBSD when building release images. The -d option is documented as a BSD-specific equivalent to the POSIX -depth primary. Whilst GNU find sort of accepts it in an attempt to be compatible, it still doesn't permit it coming before the paths, unlike BSD find, and prints a deprecation warning either way. Thus, use the equivalent POSIX -depth to ensure it works correctly and without warning everywhere. Reviewed by: jhb Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D35856 --- usr.sbin/etcupdate/etcupdate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 91417801063d..d9993fb2e58a 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -225,7 +225,7 @@ build_tree() find $1 -type f -size 0 -delete || return 1 # Trim empty directories. - find -d $1 -type d -empty -delete || return 1 + find $1 -depth -type d -empty -delete || return 1 return 0 )
