eobuilder: clean after any kind of exit

This commit is contained in:
Benjamin Dauvergne 2013-09-18 22:40:54 +02:00
parent 42e9887c1c
commit 8973ccbafe
1 changed files with 7 additions and 4 deletions

View File

@ -133,7 +133,13 @@ PROJECT_FULL_NAME=`python setup.py --fullname`
BUILD_DIR="$EOBUILDER_TMP/$PROJECT_NAME"
COMMIT_NUMBER=`git log -n1 | grep 'commit' | sed 's/commit\s*//'`
rm -rf $BUILD_DIR
function cleaning() {
echo "+ Cleaning ..."
rm -rf $BUILD_DIR
}
cleaning
trap cleaning EXIT
if ! is_something_to_build $PROJECT_NAME $PROJECT_VERSION; then
echo "+ Everything already build !"
@ -250,6 +256,3 @@ done
echo "+ Updating repository ..."
ssh root@leucas.entrouvert.org "/etc/cron.hourly/process-incoming"
echo "+ Cleaning ..."
rm -rf $BUILD_DIR