fashionCORE / entry_with_update.py
Singularity666's picture
Create entry_with_update.py
9952858 verified
raw
history blame
476 Bytes
import os
import sys
import subprocess
def update_repo():
try:
subprocess.check_call(["git", "pull"])
print("Repository updated successfully.")
except subprocess.CalledProcessError:
print("Failed to update repository.")
if __name__ == "__main__":
update_repo()
# Run the main script
main_script = os.path.join(os.path.dirname(__file__), "launch.py")
sys.exit(subprocess.call([sys.executable, main_script] + sys.argv[1:]))