Fixed updator

This commit is contained in:
OusmBlueNinja 2023-08-26 23:19:57 -05:00
parent e816eae2e5
commit b8448dea16
2 changed files with 138 additions and 143 deletions

View File

@ -4,23 +4,18 @@ import os, sys, requests, threading, time
fileList = [
"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/netget.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):
r = requests.get(url)
print(r)
if 'Requests:' in r.text:
print(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)
#print(r.text)
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):
input(f"Settings: {fileList}, {os.path.dirname(os.path.realpath(__file__))}\nPress enter to continue")