diff options
-rw-r--r-- | profiles/common/profile.bashrc | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/profiles/common/profile.bashrc b/profiles/common/profile.bashrc index a77cbfe2..4a2230b4 100644 --- a/profiles/common/profile.bashrc +++ b/profiles/common/profile.bashrc @@ -57,26 +57,27 @@ function __drop-nls-man-pages () { ) local _file - for _file in "${_FILE[@]}" ; do - if [[ ! -d "${_ed}/${_file}" ]] ; then - continue - fi - - if has noman ${FEATURES} ; then - einfo "Removing ${_file#${_ed}}" - rm -rf "${_ed}/${_file}" - else - # Drop non man? directories - find "${_ed}${_file}" \ - -mindepth 1 -maxdepth 1 \ - -type d \ - -name 'man*' -prune -o -print | - sort | - while read ; do + for _file in ${_FILES[@]} ; do + find "${_ed}" \ + -path "${_ed}${_file}" | + sort | + while read ; do + if has noman ${FEATURES} ; then einfo "Removing ${REPLY#${_ed}}" rm -rf "${REPLY}" - done - fi + else + # Drop non man? directories + find "${REPLY}" \ + -mindepth 1 -maxdepth 1 \ + -type d \ + -name 'man*' -prune -o -print | + sort | + while read ; do + einfo "Removing ${REPLY#${_ed}}" + rm -rf "${REPLY}" + done + fi + done done } |