From 15026b11187ad9cdc2be7a1d88ebce6531349a72 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 9 Nov 2016 22:14:19 +0100 Subject: XFCE: remove unused glibc locales to conserve space. The XFCE ISO is below 737.280.000 bytes again. Also, the 'vim' package fits in now, which makes gvim a lot more functional. --- make_slackware_live.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'make_slackware_live.sh') diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 538d395..929369d 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -411,6 +411,21 @@ function install_pkgs() { # Also remove some of the big unused/esoteric static libraries: rm -rf "$2"/usr/lib${DIRSUFFIX}/{libaudiofile,libgdk,libglib,libgtk}.a rm -rf "$2"/usr/lib${DIRSUFFIX}/{liblftp*,libnl}.a + # Remove unneeded languages from glibc: + KEEPLANG="$(cat ${LIVE_TOOLDIR}/languages|grep -Ev "(^ *#|^$)"|cut -d: -f1)" + 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 + done + rm -rf [A-Za-z]* + mv .keep/* . 2>/dev/null + rm -rf .keep + cd - 1>/dev/null + fi + done fi # End install_pkgs -- cgit v1.2.3