diff options
-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 } |