quick fix

This commit is contained in:
defparam 2024-07-17 11:37:03 -04:00
parent 77a5057e01
commit c9dad9d0ef
1 changed files with 19 additions and 0 deletions

19
tools/bin/download Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env python3
import sys
import urllib.request
def download_file(url, destination):
try:
urllib.request.urlretrieve(url, destination)
except Exception as e:
print(f"An error occurred: {e}", file=sys.stderr)
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: python download.py <url> <destination>", file=sys.stderr)
sys.exit(1)
url = sys.argv[1]
destination = sys.argv[2]
download_file(url, destination)