Fixed updator
This commit is contained in:
parent
e816eae2e5
commit
b8448dea16
@ -4,23 +4,18 @@ import os, sys, requests, threading, time
|
|||||||
|
|
||||||
fileList = [
|
fileList = [
|
||||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/builtin.py",
|
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/builtin.py",
|
||||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/echo.py",
|
|
||||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/nano.py",
|
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/nano.py",
|
||||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/netget.py",
|
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/netget.py",
|
||||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/pip.py",
|
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/pip.py",
|
||||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/upd.py"
|
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/update.py"
|
||||||
]
|
]
|
||||||
|
|
||||||
def download_and_save(url):
|
def download_and_save(url):
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
print(r)
|
#print(r.text)
|
||||||
if 'Requests:' in r.text:
|
fileInstallingCreator = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.basename(url))
|
||||||
|
with open(fileInstallingCreator, "w") as newFile:
|
||||||
print(r.text)
|
newFile.write(r.text)
|
||||||
print(r.headers['Content-Type'])
|
|
||||||
fileInstallingCreator = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.path.basename(url))
|
|
||||||
with open(fileInstallingCreator, "w") as newFile:
|
|
||||||
newFile.write(r.text)
|
|
||||||
|
|
||||||
def upd(command):
|
def upd(command):
|
||||||
input(f"Settings: {fileList}, {os.path.dirname(os.path.realpath(__file__))}\nPress enter to continue")
|
input(f"Settings: {fileList}, {os.path.dirname(os.path.realpath(__file__))}\nPress enter to continue")
|
||||||
|
Loading…
Reference in New Issue
Block a user