소스 검색

If a repo is already present, just use it as is

Ian Goldberg 1 개월 전
부모
커밋
37ee023a51
1개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  1. 6 7
      Scripts/clone-repos

+ 6 - 7
Scripts/clone-repos

@@ -14,8 +14,7 @@ fetch_repo() {
     update_crate="$4"
     update_crate="$4"
 
 
     if [ -d "$dir_name" ]; then
     if [ -d "$dir_name" ]; then
-        ( cd "$dir_name" && git fetch origin --tags && \
-            git checkout "$commit_id" )
+        echo "$dir_name already present"
     else
     else
         git clone "$repo_url" "$dir_name" && \
         git clone "$repo_url" "$dir_name" && \
         ( cd "$dir_name" && git checkout "$commit_id" && \
         ( cd "$dir_name" && git checkout "$commit_id" && \
@@ -23,11 +22,11 @@ fetch_repo() {
             # of our own sigma-rs dependencies
             # of our own sigma-rs dependencies
             if [ -e "../patches/${dir_name}.diff" ]; then
             if [ -e "../patches/${dir_name}.diff" ]; then
                 patch -p1 < ../patches/${dir_name}.diff || exit 1
                 patch -p1 < ../patches/${dir_name}.diff || exit 1
-            fi )
-    fi
-    # Update the Cargo.lock file to catch the now-local sigma-rs dependencies
-    if [ "$update_crate" != "" ]; then
-        ( cd "$dir_name" && cargo update "$update_crate" ) || exit 1
+            fi ) || exit 1
+        # Update the Cargo.lock file to catch the now-local sigma-rs dependencies
+        if [ "$update_crate" != "" ]; then
+            ( cd "$dir_name" && cargo update "$update_crate" ) || exit 1
+        fi
     fi
     fi
 }
 }