Update pull-all.sh to not clean the repos 65/5165/1
authorGary Wu <gary.i.wu@huawei.com>
Wed, 21 Jun 2017 21:37:43 +0000 (14:37 -0700)
committerGary Wu <gary.i.wu@huawei.com>
Wed, 21 Jun 2017 21:37:43 +0000 (14:37 -0700)
Change-Id: I784873b8137075bb08dfb856caafb7f3a143f454
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
bootstrap/jenkins/scripts/clone-all.sh
bootstrap/jenkins/scripts/pull-all.sh

index 6bdb68a..77a6caf 100755 (executable)
@@ -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
index cf6655c..6c2560f 100755 (executable)
@@ -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