diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2018-03-06 00:00:28 +0000 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2018-03-18 14:25:36 +0000 |
commit | b11d107def4686f06ed46da2277c639cd08d5153 (patch) | |
tree | 4dec2f4ed106188772bd9291d47f4bbb80537613 /profiles | |
parent | profiles/common: Use appropriate variable name (diff) | |
download | portage-b11d107def4686f06ed46da2277c639cd08d5153.tar.xz |
profiles/common: Handle /usr/share/help as /usr/share/locale
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/common/profile.bashrc | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/profiles/common/profile.bashrc b/profiles/common/profile.bashrc index c1861bc7..30b633d4 100644 --- a/profiles/common/profile.bashrc +++ b/profiles/common/profile.bashrc @@ -85,23 +85,32 @@ function __drop-nls-man-pages () { } function __drop-nls-locales () { - if [[ ! -d "${_ed}/usr/share/locale" ]] ; then - return 0 - fi + local -a _DIRS=( + /usr/share/locale + /usr/share/help + ) - find "${_ed}/usr/share/locale" \ - -mindepth 1 -maxdepth 1 \ - -type d | - sort | - while read ; do - if has "${REPLY##*/}" ${LINGUAS} ; then - continue - elif has "${REPLY##*/}" ${L10N} ; then + local _dir _l + for _dir in ${_DIRS[@]} ; do + if [[ ! -d "${_ed}${_dir}" ]] ; then continue fi - einfo "Removing ${REPLY#${_ed}}" - rm -rf "${REPLY}" + find "${_ed}${_dir}" \ + -mindepth 1 -maxdepth 1 \ + -type d | + sort | + while read ; do + _l="${REPLY##*/}" + if has "${_l}" ${LINGUAS} ; then + continue + elif has "${_l/_/-}" ${L10N} ; then + continue + fi + + einfo "Removing ${REPLY#${_ed}}" + rm -rf "${REPLY}" + done done } |