Преглед на файлове

git pull if the repo is already there

Ian Goldberg преди 1 година
родител
ревизия
38ffde151e
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4 2
      repro/build-all-dockers

+ 4 - 2
repro/build-all-dockers

@@ -19,9 +19,11 @@ clone_or_update() {
     repodir="$2"
     tag="$3"
     if [ -d comps/${repodir}/.git ]; then
-        ( cd comps/${repodir} && git fetch --tags -f origin && git checkout $tag ) || exit 1
+        ( cd comps/${repodir} && git fetch --tags -f origin && \
+            git checkout $tag && git pull ) || exit 1
     else
-        ( cd comps && git clone ${repourl} ${repodir} && cd ${repodir} && git checkout $tag ) || exit 1
+        ( cd comps && git clone ${repourl} ${repodir} && cd ${repodir} && \
+            git checkout $tag ) || exit 1
     fi
 }