diskimage-builder/diskimage_builder/elements/zypper-minimal/post-install.d/01-locale-cleanup
Dirk Mueller 59721d3c74 opensuse-minimal: install glibc-locale
We expect LC_ALL for non-C locales to be working inside
images, so always install glibc-locale for openSUSE.

Change-Id: I8fe92773e377539070d9d9fe2960a6202bb80a18
2017-07-17 22:50:25 +02:00

13 lines
285 B
Bash
Executable File

#!/bin/bash
# Only keep the minimum amount of locales to save disk space
#
if [ "${DIB_DEBUG_TRACE:-0}" -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
find /usr/lib/locale -mindepth 1 -maxdepth 1 -type d 2>/dev/null | \
grep -Ev '/(C.utf8|en_US|en_US.utf8)$' | xargs rm -rf