From d8ac62a9ec105c80163a025ad06a2d91bca8b753 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 4 Aug 2011 19:46:35 +0200 Subject: Cleaning up temporary directories at the same time as other cruft. --- scripts/build/lb_chroot_hacks | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts') diff --git a/scripts/build/lb_chroot_hacks b/scripts/build/lb_chroot_hacks index eed0294d8..57f5769fa 100755 --- a/scripts/build/lb_chroot_hacks +++ b/scripts/build/lb_chroot_hacks @@ -226,6 +226,14 @@ rm -f chroot/var/cache/debconf/*-old rm -f chroot/var/lib/dpkg/*-old rm -f chroot/var/log/apt/term.log +# Delete and re-create temporary directories +TEMP_DIRS="/tmp /var/tmp" +for DIR in ${TEMP_DIRS} +do + rm -rf "chroot/${DIR}" + install -d -m 1777 "chroot/${DIR}" +done + if [ -n "${LB_ROOT_COMMAND}" ] then ${LB_ROOT_COMMAND} chown -R --quiet $(whoami):$(whoami) chroot -- cgit v1.2.3