Cleanup tmpdirs if genkernel dies abnormally

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@270 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Eric Edgar 20 years ago
parent 64902a2b41
commit 21112dd7ce

@ -225,6 +225,9 @@ gen_die() {
print_info 1 'Please do *not* report compilation failures as genkernel bugs!'
print_info 1 ''
exit 1
# Cleanup temp dirs and caches if requested
cleanup
}
has_loop() {

@ -29,7 +29,6 @@ TEMP=${TEMP}/$RANDOM.$RANDOM.$RANDOM.$$
cleanup(){
if [ -n "$TEMP" -a -d "$TEMP" ]; then
echo "Removing $TEMP"
rm -rf "$TEMP"
fi

Loading…
Cancel
Save