瀏覽代碼

Cleaup stale submodule

If the tree has a stale submodule, make sure we clean it up first
Daniel Hiltgen 1 年之前
父節點
當前提交
9983fa5f4e
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      llm/generate/gen_common.sh

+ 5 - 0
llm/generate/gen_common.sh

@@ -18,6 +18,11 @@ git_module_setup() {
         echo "Skipping submodule initialization"
         return
     fi
+    # Make sure the tree is clean after the directory moves
+    if [ -d "${LLAMACPP_DIR}/gguf" ]; then
+        echo "Cleaning up old submodule"
+        rm -rf ${LLAMACPP_DIR}
+    fi
     git submodule init
     git submodule update --force ${LLAMACPP_DIR}