commit 150f2f60dde5244f10487199fb788b8a433f9398 Author: Zezik <1+zezik@noreply.localhost> Date: Sat Sep 12 06:55:19 2026 +0000 Nahrát soubory do „/“ diff --git a/gitea.py b/gitea.py new file mode 100644 index 0000000..a04b8b3 --- /dev/null +++ b/gitea.py @@ -0,0 +1,21 @@ +import os, json + +# Check latest version +os.system("curl -s -o version.json 'https://dl.gitea.com/gitea/version.json'") +json_file = 'version.json' +with open(json_file, 'r') as file: + json_content = json.load(file) +latest_version = json_content['latest']['version'] + +# Download if new +downloaded_file = f"gitea-{latest_version}-linux-amd64" +if not os.path.exists(downloaded_file): + print("INFO: Stahuji novou verzi...") + download_url = f"https://dl.gitea.com/gitea/{latest_version}/{downloaded_file}" + os.system(f"wget -q {download_url}") +else: + print("INFO: Máš nejnovější verzi.") + +# Start Gitea +os.system(f"chmod +x {downloaded_file}") +os.system(f"./{downloaded_file}") \ No newline at end of file