summaryrefslogtreecommitdiff
path: root/profiles/common
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2016-02-14 13:25:17 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2016-02-17 01:14:45 +0000
commit8c9af9aadceb57cc913dd4535b68d86b2118979d (patch)
tree52362ba08a67894559b7050175518f9ab9e826a7 /profiles/common
parentprofiles/common: Remove icedtea-bin man-pages (diff)
downloadportage-8c9af9aadceb57cc913dd4535b68d86b2118979d.tar.xz
profiles/common: Fix man pages removal logic
Diffstat (limited to 'profiles/common')
-rw-r--r--profiles/common/profile.bashrc37
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
}