From 9f8202c8a9f42235b396d62430f75d6b1120ebd6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 2 May 2018 16:49:08 +0100 Subject: [PATCH] Remove directories if they exist --- jenkins.sh | 1 + scripts/fetchdep.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/jenkins.sh b/jenkins.sh index 0f7a58ee69..8cf5ee4a1f 100755 --- a/jenkins.sh +++ b/jenkins.sh @@ -12,6 +12,7 @@ set -x npm install scripts/fetchdep.sh matrix-org matrix-js-sdk +rm -r node_modules/matrix-js-sdk || true ln -s ../matrix-js-sdk node_modules/matrix-js-sdk (cd matrix-js-sdk && npm install) diff --git a/scripts/fetchdep.sh b/scripts/fetchdep.sh index a8551cf15d..73c622133b 100755 --- a/scripts/fetchdep.sh +++ b/scripts/fetchdep.sh @@ -5,6 +5,8 @@ set -e org="$1" repo="$2" +rm -r "$repo" || true + curbranch="$TRAVIS_PULL_REQUEST_BRANCH" [ -z "$curbranch" ] && curbranch="$TRAVIS_BRANCH" [ -z "$curbranch" ] && curbranch=`"echo $GIT_BRANCH" | sed -e 's/^origin\///'` # jenkins