summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:05:14 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:26 +0100
commit0d5ff4ca7596790f853cf637e0fe225cad810a76 (patch)
tree360ca9a49f3d82d589a4b49c98e5210dfcb3b74e /hooks
parentcd5110f6b8eb77519d704972276cfd5be6bff055 (diff)
downloadlive-build-0d5ff4ca7596790f853cf637e0fe225cad810a76.zip
live-build-0d5ff4ca7596790f853cf637e0fe225cad810a76.tar.gz
Adding live-helper 1.0~a18-1.
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/mini12
-rwxr-xr-xhooks/minimal12
2 files changed, 18 insertions, 6 deletions
diff --git a/hooks/mini b/hooks/mini
index 14f942a..c074fe7 100755
--- a/hooks/mini
+++ b/hooks/mini
@@ -10,9 +10,15 @@
set -e
# Removing unused packages
-apt-get remove --purge --yes apt-utils aptitude
-apt-get remove --purge --yes man-db manpages info
-apt-get remove --purge --yes ssl wget
+for PACKAGE in apt-utils aptitude man-db manpages info ssl wget
+do
+ if ! apt-get remove --purge --yes "${PACKAGE}"
+ then
+ echo "WARNING: ${PACKAGE} isn't installed"
+ fi
+done
+
+apt-get autoremove || true
# Removing unused files
find . -name *~ | xargs rm -f
diff --git a/hooks/minimal b/hooks/minimal
index c5bb412..37e1f75 100755
--- a/hooks/minimal
+++ b/hooks/minimal
@@ -10,9 +10,15 @@
set -e
# Removing unused packages
-apt-get remove --purge --yes apt-utils aptitude
-apt-get remove --purge --yes man-db manpages info
-apt-get remove --purge --yes ssl wget
+for PACKAGE in apt-utils aptitude man-db manpages info ssl wget
+do
+ if ! apt-get remove --purge --yes "${PACKAGE}"
+ then
+ echo "WARNING: ${PACKAGE} isn't installed"
+ fi
+done
+
+apt-get autoremove || true
# Removing unused files
find . -name *~ | xargs rm -f