Repository: archiva Updated Branches: refs/heads/master bc9256ad0 -> 7236f4d8a
Adding tmp dir cleanup to ci prepare script Project: http://git-wip-us.apache.org/repos/asf/archiva/repo Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/7236f4d8 Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/7236f4d8 Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/7236f4d8 Branch: refs/heads/master Commit: 7236f4d8a93b4db42694cfa919473ec288546dc7 Parents: bc9256a Author: Martin Stockhammer <[email protected]> Authored: Wed Nov 15 23:10:37 2017 +0100 Committer: Martin Stockhammer <[email protected]> Committed: Wed Nov 15 23:10:37 2017 +0100 ---------------------------------------------------------------------- src/ci/scripts/prepareWorkspace.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/archiva/blob/7236f4d8/src/ci/scripts/prepareWorkspace.sh ---------------------------------------------------------------------- diff --git a/src/ci/scripts/prepareWorkspace.sh b/src/ci/scripts/prepareWorkspace.sh index c9d1d8d..b79cd44 100644 --- a/src/ci/scripts/prepareWorkspace.sh +++ b/src/ci/scripts/prepareWorkspace.sh @@ -22,7 +22,7 @@ # # Removes directories that are not used anymore. ## -ATTIC_DIRS="" +ATTIC_DIRS="archiva-modules/archiva-base/archiva-indexer" REMOVE_DIRS=".indexer" for i in ${ATTIC_DIRS}; do @@ -35,3 +35,22 @@ done for i in ${REMOVE_DIRS}; do find . -type d -name "${i}" -print0 | xargs -0 rm -rvf done + +TMP_DIRS="/tmp/archiva /var/tmp/archiva" +for MY_TMP in $TMP_DIRS; do + if [ -e ${MY_TMP} ]; then + echo "Trying to delete ${MY_TMP}" + rm -rf ${MY_TMP} >/dev/null 2>&1 + fi + if [ -e ${MY_TMP} ]; then + echo "Trying to move ${MY_TMP} away" + mv ${MY_TMP} ${MY_TMP}.$$ + fi + if [ -e ${MY_TMP} ]; then + echo "Warning there exists a temporary directory, that cannot be cleaned ${MY_TMP}" + ls -latr ${MY_TMP} + ls -latr $(dirname ${MY_TMP}) + fi +done + +exit 0
