diff options
author | Eric Hameleers <alien@slackware.com> | 2017-07-18 11:01:56 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2017-07-18 11:01:56 +0200 |
commit | 30aeab5a36e0c1f5b94f7bd7f3e94315c8546932 (patch) | |
tree | a0131ce90b09a0cc2a28286ca155774a1803422b /make_slackware_live.sh | |
parent | 9d48a4829c63dc43faf7e6ea19b83f975eef8d07 (diff) | |
download | liveslak-30aeab5a36e0c1f5b94f7bd7f3e94315c8546932.tar.gz liveslak-30aeab5a36e0c1f5b94f7bd7f3e94315c8546932.tar.xz |
XFCE variant: make it fit on a 703 MB CDROM medium again
Yet more aggressive pruning of unneeded files (documentation mostly).
Packages that were (re-)added:
min/ghostscript
min/libedit
min/libidn2
xbase/SDL2
xbase/SDL2_gfx
xbase/SDL2_image
xbase/SDL2_mixer
xbase/SDL2_net
xbase/SDL2_ttf
xbase/libbluray
xbase/ocl-icd
Packages that were removed:
min/elvis
min/lilo
xapbase/xpaint
xbase/djvulibre
xbase/gtk+
xbase/liberation-fonts-ttf
xbase/xv
xfce/orage
Diffstat (limited to 'make_slackware_live.sh')
-rwxr-xr-x | make_slackware_live.sh | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 4694806..feba56b 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -433,13 +433,16 @@ function install_pkgs() { (cd "${2}/usr/doc" && find . -type d -mindepth 2 -maxdepth 2 -exec rm -rf {} \;) rm -rf "$2"/usr/share/gtk-doc rm -rf "$2"/usr/share/help + find "$2"/usr/share/ -type d -name doc |xargs rm -rf # Remove residual bloat: rm -rf "${2}"/usr/doc/*/html rm -f "${2}"/usr/doc/*/*.{html,css,xml,pdf,db,gz,bz2,xz,txt,TXT} + # Remove info pages: + rm -rf "$2"/usr/info fi if [ "$TRIM" = "mandoc" ]; then - # Also remove man and info pages: - rm -rf "$2"/usr/man "$2"/usr/info + # Also remove man pages: + rm -rf "$2"/usr/man fi if [ "$LIVEDE" = "XFCE" ]; then # By pruning stuff that no one likely needs anyway, @@ -458,14 +461,31 @@ function install_pkgs() { rm -rf "$2"/usr/lib${DIRSUFFIX}/clang/*/lib/linux/*.a{,.syms} # Get rid of useless documentation: rm -rf "$2"/usr/share/ghostscript/*/doc/ + # We don't need tests or examples: + find "$2"/usr/ -type d -iname test |xargs rm -rf + find "$2"/usr/ -type d -iname "example*" |xargs rm -rf + # Get rid of most of the screensavers: + KEEPXSCR="julia xflame xjack" + if [ -d "${2}"/usr/libexec/xscreensaver ]; then + cd "${2}"/usr/libexec/xscreensaver + mkdir .keep + for XSCR in ${KEEPXSCR} ; do + mv ${XSCR} .keep/ 2>/dev/null + done + rm -rf [A-Za-z]* + mv .keep/* . 2>/dev/null + rm -rf .keep + cd - 1>/dev/null + fi # Remove unneeded languages from glibc: - KEEPLANG="$(cat ${LIVE_TOOLDIR}/languages|grep -Ev "(^ *#|^$)"|cut -d: -f1)" + KEEPLANG="$(cat ${LIVE_TOOLDIR}/languages|grep -Ev "(^ *#|^$)"|cut -d: -f5)" for LOCALEDIR in /usr/lib${DIRSUFFIX}/locale /usr/share/i18n/locales /usr/share/locale ; do if [ -d "${2}"/${LOCALEDIR} ]; then cd "${2}"/${LOCALEDIR} mkdir .keep for KL in C ${KEEPLANG} ; do - mv ${KL}* .keep 2>/dev/null + mv ${KL%%.utf8}* .keep/ 2>/dev/null # en_US.utf8 -> en_US* + mv ${KL%%_*} .keep/ 2>/dev/null # en_US.utf8 -> en done rm -rf [A-Za-z]* mv .keep/* . 2>/dev/null |