You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-core/hooks/10-remove-documentation.binary

23 lines
867 B

#!/bin/sh -x
echo "I: Remove unneeded files from /usr/share/doc "
find binary/boot/filesystem.dir/usr/share/doc -depth -type f ! -name copyright|xargs rm -f || true
find binary/boot/filesystem.dir/usr/share/doc -empty|xargs rmdir || true
find binary/boot/filesystem.dir/usr/share/doc -type f -exec gzip -9 {} \;
echo "I: Remove man/info pages"
rm -rf binary/boot/filesystem.dir/usr/share/man \
binary/boot/filesystem.dir/usr/share/groff \
binary/boot/filesystem.dir/usr/share/info \
binary/boot/filesystem.dir/usr/share/lintian \
binary/boot/filesystem.dir/usr/share/linda \
binary/boot/filesystem.dir/var/cache/man
echo "I: Removing /var/lib/apt/lists/*"
find binary/boot/filesystem.dir/var/lib/apt/lists/ -type f | xargs rm -f
echo "I: Removing /var/cache/apt/*.bin"
rm -f binary/boot/filesystem.dir/var/cache/apt/*.bin