From 9e318874d816a10141029bcad7551e93c65cef8f Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Mon, 21 Aug 2017 19:18:58 +0200 Subject: [PATCH 184/325] strip-freebsd.sh: Try to remove directories that reference unused contrib code Obtained from: ElectroBSD --- release/scripts/strip-freebsd.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/release/scripts/strip-freebsd.sh b/release/scripts/strip-freebsd.sh index 75b48141a6d9..b8be6b84ec9d 100755 --- a/release/scripts/strip-freebsd.sh +++ b/release/scripts/strip-freebsd.sh @@ -134,13 +134,24 @@ get_directories_to_ditch() { echo "sys/dev/${sys_dev}" done + # For each known unused directory remove it from + # "contrib" (where most of the code is located) + # and "usr.sbin" and "usr.bin" if a directory with + # the same name exists. for contrib_dir in $(get_unused_contrib_dirs); do - potential_directory="contrib/${contrib_dir}" + for potential_parent in contrib usr.sbin usr.bin; do + potential_directory="${potential_parent}/${contrib_dir}" if [ -d "${potential_directory}" ]; then echo "${potential_directory}" fi + done done + # Not automatically detected in the loop above + # because the contrib directories are named + # differently. + echo "usr.bin/svn" + # These files aren't useful without sendmail itself. # More importantly, some of them are licensed under the # "Sendmail License" which isn't part of the directory. -- 2.32.0