mkimage-profiles/features.in/lowmem/install2/image-scripts.d/85cleanup-lowmem
Michael Shigorin 720a579690 wash, rinse, repeat
install2 cleanups:

- functionally indifferent ones: particularly, install2/*/98system's
  "mkdir -p /image" was superfluous as it was done by that time already
  by sub.in/stage2/image-scripts.d/00stage1

- taken apart, prepared for tags: so far it's a mostly moot change
  since the installer cleanup scripts themselves are mostly the same as
  preceding 90cleanup was (with some additions corresponding to recent
  kernel development); it's still unclear what the mechanism for
  configuring the cleanups in effect will be, either directory/package
  regex lists or tagged scripts excluded from execution by yet another tag

fixes:

- image.in/Makefile: fix metadata related test; the actual test was
  assuming that stage1 kernel means installer, which is not the case
  since generic stage2 introduction; oh well

- 85cleanup-lowmem: a "_" too much was the culprit in destroying the
  needed translations along with those deemed superfluous; thanks go to
  Oleg Ivanov and Lenar Shakirov for finding the bug and proposing the
  fix altogether

additions:

- features.in/Makefile: reworked help target; it was rather inaccessible
  due to BUILDDIR normally undefined at the time of direct make
  invocation, and BUILDDIR is normally defined during normal builds
  anyways so let's try it this way.

- README++

daydreams:

- 01-genbasedir: we should drop bzip2 compressed pkglists some day
  but see genbasedir and apt-cdrom first, 90-pkg.sh (alterator-pkg)
  will fail miserably otherwise
2011-11-04 16:15:31 +02:00

39 lines
813 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* *_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?)
: