]> source.dussan.org Git - archiva.git/commitdiff
Fixing workspace prepare script
authorMartin Stockhammer <martin_s@apache.org>
Wed, 24 Oct 2018 20:55:30 +0000 (22:55 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Wed, 24 Oct 2018 20:55:30 +0000 (22:55 +0200)
src/ci/scripts/prepareWorkspace.sh

index 941a99efc166f9718de44a734883e244003f4738..052d6e238984f20e1457ab960f4ee1fd2898ec55 100644 (file)
@@ -22,7 +22,7 @@
 #
 #  Removes directories that are not used anymore.
 ##
-ATTIC_DIRS="archiva-modules/archiva-base/archiva-indexer"
+ATTIC_DIRS=""
 REMOVE_DIRS=".indexer"
 TMP_DIRECTORY=".tmp"
 
@@ -44,10 +44,12 @@ if [ -e "${TMP_DIRECTORY}" ]; then
 fi
 mkdir -p "${TMP_DIRECTORY}"
 
-if [ -d "${REPO_DIR}" ]; then
-  rm -rf "${REPO_DIR}"
-else
-  echo "WARNING: Directory not found ${REPO_DIR}"
+if [ ! -z "${REPO_DIR}" ]; then
+  if [ -d "${REPO_DIR}" ]; then
+    rm -rf "${REPO_DIR}"
+  else
+    echo "WARNING: Directory not found ${REPO_DIR}"
+  fi
 fi
 
 for i in ${ATTIC_DIRS}; do