From a2e5cabc2f1e04c948da7026f816549848c2bcd9 Mon Sep 17 00:00:00 2001 From: Michal Skalski Date: Thu, 7 Jul 2016 09:38:09 +0200 Subject: [PATCH] Do not include temporary files to plugin Change-Id: I852d496bb9f7055e0aaf2346bde8dbd751d9410a Signed-off-by: Michal Skalski --- pre_build_hook | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pre_build_hook b/pre_build_hook index 086e71d..7cffdf8 100755 --- a/pre_build_hook +++ b/pre_build_hook @@ -19,11 +19,16 @@ BUILD_FOR=${BUILD_FOR:-ubuntu} DIR="$(dirname `readlink -f $0`)" TMP_DIR="${DIR}/tmp" +#Remove temporary files +CLEANUP=${CLEANUP:-true} + function cleanup { rm -rf "${TMP_DIR}" } function build_pkg { + # clean up old packages + rm -rf ${DIR}/repositories/${1}/* case $1 in ubuntu) pushd "${DIR}/repositories/${1}/" @@ -77,4 +82,6 @@ do build_pkg $system done -#cleanup +if [ "$CLEANUP" != false ];then + cleanup +fi