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
This commit is contained in:
parent
f377243996
commit
c5e30fbdb7
@ -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
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user