diff options
Diffstat (limited to 'hooks/minimal')
-rwxr-xr-x | hooks/minimal | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/hooks/minimal b/hooks/minimal index ff02ddc37..f081fccc7 100755 --- a/hooks/minimal +++ b/hooks/minimal @@ -9,15 +9,27 @@ set -e -# Removing unused packages -for PACKAGE in apt-utils aptitude man-db manpages info wget -do +Purge() { + PACKAGE="${1}" + if ! apt-get remove --purge --yes "${PACKAGE}" then echo "WARNING: ${PACKAGE} isn't installed" fi +} + +# Removing unused packages +for PACKAGE in aptitude man-db manpages info wget +do + Purge ${PACKAGE} done +# Remove apt-utils if we do not require it for lh_chroot_sources +if [ ! -e chroot/root/local-packages/Packages.gz ] +then + Purge apt-utils +fi + apt-get autoremove --yes || true # Removing unused files |