Lutz Roeder 6 лет назад
Родитель
Сommit
c0cb04ea4c
14 измененных файлов с 40 добавлено и 37 удалено
  1. 3 3
      tools/caffe
  2. 3 3
      tools/cntk
  3. 3 2
      tools/coreml
  4. 3 3
      tools/darknet
  5. 3 3
      tools/dl4j
  6. 3 3
      tools/mlnet
  7. 3 3
      tools/mxnet
  8. 3 3
      tools/ncnn
  9. 3 2
      tools/paddle
  10. 1 2
      tools/pytorch
  11. 3 3
      tools/sklearn
  12. 3 2
      tools/tf
  13. 3 2
      tools/tflite
  14. 3 3
      tools/torch

+ 3 - 3
tools/caffe

@@ -17,12 +17,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2}
         git -C "${third_party}" clone --quiet --recursive ${2}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/cntk

@@ -17,12 +17,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 2
tools/coreml

@@ -18,11 +18,12 @@ bold() {
 git_sync () {
 git_sync () {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2}
         git -C "${third_party}" clone --quiet --recursive ${2}
     fi
     fi
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/darknet

@@ -17,12 +17,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/dl4j

@@ -17,12 +17,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/mlnet

@@ -17,12 +17,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/mxnet

@@ -16,12 +16,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/ncnn

@@ -16,12 +16,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 2
tools/paddle

@@ -18,11 +18,12 @@ bold() {
 git_sync () {
 git_sync () {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch -p --quiet
-        git -C "${third_party}/${1}" reset --quiet --hard origin/$(git -C "${third_party}/${1}" rev-parse --abbrev-ref HEAD)
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 1 - 2
tools/pytorch

@@ -20,8 +20,7 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/$(git -C "${third_party}/${1}" rev-parse --abbrev-ref HEAD)
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi

+ 3 - 3
tools/sklearn

@@ -16,12 +16,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 sync() {
 sync() {

+ 3 - 2
tools/tf

@@ -19,11 +19,12 @@ bold() {
 git_sync () {
 git_sync () {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2}
         git -C "${third_party}" clone --quiet --recursive ${2}
     fi
     fi
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 2
tools/tflite

@@ -18,11 +18,12 @@ bold() {
 git_sync () {
 git_sync () {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -q
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2}
         git -C "${third_party}" clone --quiet --recursive ${2}
     fi
     fi
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {

+ 3 - 3
tools/torch

@@ -17,12 +17,12 @@ bold() {
 git_sync() {
 git_sync() {
     mkdir -p "${third_party}"
     mkdir -p "${third_party}"
     if [ -d "${third_party}/${1}" ]; then
     if [ -d "${third_party}/${1}" ]; then
-        git -C "${third_party}/${1}" fetch --quiet -p
-        git -C "${third_party}/${1}" reset --quiet --hard origin/master
+        git -C "${third_party}/${1}" pull --quiet --prune
     else
     else
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
         git -C "${third_party}" clone --quiet --recursive ${2} ${1}
     fi
     fi
-    git -C "${third_party}/${1}" submodule update --quiet --init
+    git -C "${third_party}/${1}" submodule sync --quiet
+    git -C "${third_party}/${1}" submodule update --quiet --init --recursive
 }
 }
 
 
 clean() {
 clean() {