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/minimize-manual

17 lines
460 B

#!/bin/sh
# Minimize the number of manually installed packages in the image
# Finds all packages which could be marked as automatically installed and marks
# them as such
set -e
chroot_directory=$1
auto_packages=$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot_directory)
if [ -n "$auto_packages" ]; then
chroot $chroot_directory apt-mark auto $auto_packages
fi
[ -z "$(/usr/share/livecd-rootfs/auto-markable-pkgs $chroot_directory 2> /dev/null)" ]