mkimage-profiles/features.in/lowmem/install2/image-scripts.d/85cleanup-lowmem
Michael Shigorin 24ce6f541d features.in/lowmem: initial release
This feature should absorb ha^Wmeasures for keeping install2
memory footprint to minimum, and so far it drops things not
critical for ru/uk/be users on the floor.

Should be ported to a l10n support framework when there's one.
2011-11-04 16:15:30 +02:00

43 lines
829 B
Bash
Executable File

#!/bin/sh
# remove unused (or too small) fonts
cd /usr/share/fonts/bitmap/misc/ &&
rm -f [admno]* cu[^r]*
# drop unneeded translation
# FIXME: whitelist is reasonable
cd /usr/share/qt4/translations/ &&
rm -f *_ar* *_cs* *_da* *_de* *_es* *_fr* \
*_gl* *_he* *_hu* *_pl* \
*_sk* *_sl* *_sv*
# ...l10n...
# FIXME: whitelist is reasonable
cd /usr/share/X11/locale &&
rm -rf am_ET.UTF-8 armscii-8 el_GR.UTF-8 fi_FI.UTF-8
# xkb; don't drop "pc" yet
cd /usr/share/X11/xkb/symbols &&
ls \
| egrep -v 'by|en|kz|pt|ru|ua|us|pc|....*' \
| xargs rm -rf
# gconv
cd /usr/lib*/gconv &&
rm -f EUC* G* I*
# locales
cd /usr/lib*/locale &&
ls \
| egrep -v '^(be|en|kk|pt|ru|uk)_' \
| xargs rm -rf
# remove kbd data
# FIXME: might break things?
#rm -rf /lib/kbd/
# outstanding binaries
rm /bin/ipv6calc /sbin/sln
: