From 9983fa5f4ed0e03248eac688fad2dd665698a719 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Thu, 4 Jan 2024 13:40:16 -0800 Subject: [PATCH] Cleaup stale submodule If the tree has a stale submodule, make sure we clean it up first --- llm/generate/gen_common.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llm/generate/gen_common.sh b/llm/generate/gen_common.sh index 9574e6fd..5ff37cff 100644 --- a/llm/generate/gen_common.sh +++ b/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}