From 1799694537d5125a1ff30ebbb6a05197ae0033fb Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 8 Nov 2023 15:39:08 +0100 Subject: [PATCH] Update update_script.py --- update_script.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/update_script.py b/update_script.py index 298775f4..372f030e 100644 --- a/update_script.py +++ b/update_script.py @@ -5,6 +5,7 @@ import git import subprocess import argparse from pathlib import Path +from ascii_colors import ASCIIColors, trace_exception def run_git_pull(): try: @@ -27,6 +28,27 @@ def run_git_pull(): except Exception as ex: print(f"Couldn't checkout module {submodule}") + + execution_path = Path(os.getcwd()) + + # Clone the repository to the target path + ASCIIColors.info("Lollms_core found in the app space.\nPulling last lollms_core") + subprocess.run(["git", "-C", str(execution_path/"lollms_core"), "pull"]) + subprocess.run(["git", "-C", str(execution_path/"utilities/safe_store"), "pull"]) + # Pull the repository if it already exists + + ASCIIColors.info("Bindings zoo found in your personal space.\nPulling last personalities zoo") + subprocess.run(["git", "-C", self.lollms_paths.bindings_zoo_path, "pull"]) + # Pull the repository if it already exists + ASCIIColors.info("Personalities zoo found in your personal space.\nPulling last personalities zoo") + subprocess.run(["git", "-C", self.lollms_paths.personalities_zoo_path, "pull"]) + # Pull the repository if it already exists + ASCIIColors.info("Extensions zoo found in your personal space.\nPulling last Extensions zoo") + subprocess.run(["git", "-C", self.lollms_paths.extensions_zoo_path, "pull"]) + # Pull the repository if it already exists + ASCIIColors.info("Models zoo found in your personal space.\nPulling last Models zoo") + subprocess.run(["git", "-C", self.lollms_paths.models_zoo_path, "pull"]) + except Exception as ex: print("Couldn't update submodules") print(ex)