modified: packages/pakk.conf
modified: packages/update.py
This commit is contained in:
parent
6c1676da18
commit
316c5c5eae
@ -1 +1 @@
|
||||
[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['upd', 'packages.update', ['upd']]]
|
||||
[['builtin', 'packages.builtin', ['echo', 'ls', 'rm', 'clear', 'cd', 'll']], ['upd', 'packages.update', ['upd']], ['pip', 'packages.pip', ['pip']]]
|
@ -1,6 +1,6 @@
|
||||
#["upd", "packages.update", ["upd"]]
|
||||
# Made By Blurple
|
||||
import os, sys, requests
|
||||
import os, sys, requests, threading
|
||||
|
||||
fileList = [
|
||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/builtin.py",
|
||||
@ -11,9 +11,7 @@ fileList = [
|
||||
"https://raw.githubusercontent.com/OusmBlueNinja/TermPY/main/packages/upd.py"
|
||||
]
|
||||
|
||||
def upd(command):
|
||||
input(f"Settings: {fileList}, {os.path.dirname(os.path.realpath(__file__))}\nPress enter to continue")
|
||||
for url in fileList:
|
||||
def download_and_save(url):
|
||||
r = requests.get(url)
|
||||
if 'Requests:' in r.text:
|
||||
print(r.text)
|
||||
@ -21,3 +19,15 @@ def upd(command):
|
||||
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")
|
||||
|
||||
threads = []
|
||||
for url in fileList:
|
||||
thread = threading.Thread(target=download_and_save, args=(url,))
|
||||
threads.append(thread)
|
||||
thread.start()
|
||||
|
||||
for thread in threads:
|
||||
thread.join()
|
||||
|
Loading…
Reference in New Issue
Block a user