source: live-build/trunk/fuentes/examples/hooks/minimal.chroot @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 722 bytes
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
6## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7## This is free software, and you are welcome to redistribute it
8## under certain conditions; see COPYING for details.
9
10
11set -e
12
13# Removing unused packages
14for PACKAGE in apt-utils aptitude man-db manpages info wget
15do
16        if ! apt-get remove --purge --yes "${PACKAGE}"
17        then
18                echo "WARNING: ${PACKAGE} isn't installed"
19        fi
20done
21
22apt-get autoremove --yes || true
23
24# Removing unused files
25find . -name *~ -print0 | xargs -0 rm -f
26
27rm -rf /var/cache/man/*
28
29# Truncating logs
30for FILE in $(find /var/log/ -type f)
31do
32        : > ${FILE}
33done
Note: See TracBrowser for help on using the repository browser.