From 3655edcc82d62f5acd545391255fb43a89058f4e Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Wed, 21 Jun 2017 14:37:43 -0700 Subject: Update pull-all.sh to not clean the repos Change-Id: I784873b8137075bb08dfb856caafb7f3a143f454 Signed-off-by: Gary Wu --- bootstrap/jenkins/scripts/clone-all.sh | 6 ++++-- bootstrap/jenkins/scripts/pull-all.sh | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'bootstrap/jenkins/scripts') diff --git a/bootstrap/jenkins/scripts/clone-all.sh b/bootstrap/jenkins/scripts/clone-all.sh index 6bdb68a09..77a6cafdc 100755 --- a/bootstrap/jenkins/scripts/clone-all.sh +++ b/bootstrap/jenkins/scripts/clone-all.sh @@ -1,5 +1,7 @@ #!/bin/sh while read p; do - echo $p - git clone ssh://gerrit.onap.org:29418/$p $p + if [ ! -e $p ]; then + echo $p + git clone ssh://gerrit.onap.org:29418/$p $p + fi done < projects.txt diff --git a/bootstrap/jenkins/scripts/pull-all.sh b/bootstrap/jenkins/scripts/pull-all.sh index cf6655ce7..6c2560f5c 100755 --- a/bootstrap/jenkins/scripts/pull-all.sh +++ b/bootstrap/jenkins/scripts/pull-all.sh @@ -1,8 +1,14 @@ -#!/bin/sh +#!/bin/bash while read p; do - echo $p - cd ~/Projects/onap/$p - git fetch - git reset --hard origin - git clean -f -d -x + if [ ! -e $p ]; then + echo $p + git clone ssh://gerrit.onap.org:29418/$p $p + else + pushd $p > /dev/null + # git fetch + # git reset --hard origin + echo -ne "$p:\t" + git pull + popd > /dev/null + fi done < projects.txt -- cgit 1.2.3-korg