#!/usr/bin/env bash set -e # See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816 KEEPLANG=en_US find /usr/share/locale -mindepth 1 -maxdepth 1 -type d -not -name "${KEEPLANG}" -exec rm -rf {} + localedef --list-archive | grep -a -v ^"${KEEPLANG}" | xargs localedef --delete-from-archive mv -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl build-locale-archive