Nahrát soubory do „/“
This commit is contained in:
@@ -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}")
|
||||
Reference in New Issue
Block a user