Singularity666 commited on
Commit
9952858
Β·
verified Β·
1 Parent(s): 4ba8d71

Create entry_with_update.py

Browse files
Files changed (1) hide show
  1. entry_with_update.py +17 -0
entry_with_update.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+
5
+ def update_repo():
6
+ try:
7
+ subprocess.check_call(["git", "pull"])
8
+ print("Repository updated successfully.")
9
+ except subprocess.CalledProcessError:
10
+ print("Failed to update repository.")
11
+
12
+ if __name__ == "__main__":
13
+ update_repo()
14
+
15
+ # Run the main script
16
+ main_script = os.path.join(os.path.dirname(__file__), "launch.py")
17
+ sys.exit(subprocess.call([sys.executable, main_script] + sys.argv[1:]))