From 5fcce410ec8024d24592a463bf04d16208de8f6d Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Mon, 21 May 2018 17:35:34 +0200 Subject: Improving cleanup --- src/ci/scripts/prepareWorkspace.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') diff --git a/src/ci/scripts/prepareWorkspace.sh b/src/ci/scripts/prepareWorkspace.sh index b79cd4457..d0f45bb68 100644 --- a/src/ci/scripts/prepareWorkspace.sh +++ b/src/ci/scripts/prepareWorkspace.sh @@ -25,6 +25,23 @@ ATTIC_DIRS="archiva-modules/archiva-base/archiva-indexer" REMOVE_DIRS=".indexer" +while [ ! -z "$1" ]; do + case "$1" in + -d) + shift + REPO_DIR=$1 + shift + ;; + *) + shift + ;; + esac +done + +if [ -d "${REPO_DIR}" ]; then + rm -rf "${REPO_DIR}" +fi + for i in ${ATTIC_DIRS}; do if [ "X${i}" != "X" -a -d ${i} ]; then echo "Deleting directory ${i}" -- cgit v1.2.3