aboutsummaryrefslogtreecommitdiffstats
path: root/export-image/04-finalise/01-run.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-07-04 04:31:17 +0200
committerSven Gothel <[email protected]>2021-07-04 04:31:17 +0200
commite8d2a1900999d604a9db244145eaef44fe2bdf05 (patch)
treec0160c50d0a7b4e35bcdd1a2e8c4eb39dd3dfb93 /export-image/04-finalise/01-run.sh
parent7fad4ef421c5b0896209e83fe1e90938269a84b2 (diff)
REDUCED_FOOTPRINT: Group all related tasks to this env-var setting: apt selection and cache, /usr/share/doc/ and most locale; See README.md
Diffstat (limited to 'export-image/04-finalise/01-run.sh')
-rwxr-xr-xexport-image/04-finalise/01-run.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh
index abb0a91..57936df 100755
--- a/export-image/04-finalise/01-run.sh
+++ b/export-image/04-finalise/01-run.sh
@@ -27,13 +27,15 @@ on_chroot << EOF
hardlink -t /usr/share/doc
fi
- # Keep in sync:
- # stage0/00-configure-apt/files/01_nodoc
- # export-image/04-finalise/01-run.sh
- find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true
- find /usr/share/doc -empty|xargs rmdir || true
- rm -rf /usr/share/man /usr/share/groff /usr/share/info /usr/share/lintian /usr/share/linda /var/cache/man
- find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en' ! -name 'de*' ! -name 'se*' ! -name 'fr*' |xargs rm -r
+ if [ "${REDUCED_FOOTPRINT}" = "1" ]; then
+ # Keep in sync:
+ # stage0/00-configure-apt/files/01_nodoc
+ # export-image/04-finalise/01-run.sh
+ find /usr/share/doc -depth -type f ! -name copyright|xargs rm || true
+ find /usr/share/doc -empty|xargs rmdir || true
+ rm -rf /usr/share/man /usr/share/groff /usr/share/info /usr/share/lintian /usr/share/linda /var/cache/man
+ find /usr/share/locale -mindepth 1 -maxdepth 1 ! -name 'en*' ! -name 'da*' ! -name 'de*' ! -name 'es*' ! -name 'fi*' ! -name 'fr*' ! -name 'is*' ! -name 'nb*' ! -name 'ru*' ! -name 'sv*' ! -name 'zh*' |xargs rm -r
+ fi
EOF
if [ -d "${ROOTFS_DIR}/home/${FIRST_USER_NAME}/.config" ]; then