File: 01-locale-cleanup

package info (click to toggle)
python-diskimage-builder 3.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,616 kB
  • sloc: sh: 7,689; python: 3,933; makefile: 34
file content (12 lines) | stat: -rwxr-xr-x 285 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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