mkimage-profiles/features.in/lowmem/install2/image-scripts.d/85cleanup-lowmem

39 lines
813 B
Plaintext
Raw Normal View History

#!/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* *_fa* *_fr* \
*_gl* *_he* *_hu* *_ko* *_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
for dir in /usr/{lib*,share}/locale; do
cd "$dir" && \
ls \
| egrep -v '^be|en|kk|pt|ru|uk' \
| xargs rm -rf --;
done
### consider cleaning up kbd data (partially?)
: