|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
import requests |
|
|
|
|
import subprocess |
|
|
|
|
import sys |
|
|
|
|
import os |
|
|
|
|
import argparse |
|
|
|
|
import shlex |
|
|
|
|
|
|
|
|
@ -57,7 +58,10 @@ url = args.url
|
|
|
|
|
pager = shlex.split(args.pager) |
|
|
|
|
interpreter = shlex.split(args.interpreter) |
|
|
|
|
|
|
|
|
|
print(f"Downloading `{url}`...") |
|
|
|
|
content = requests.get(url).content |
|
|
|
|
print("Download successful.") |
|
|
|
|
print("=" * os.get_terminal_size().columns) |
|
|
|
|
|
|
|
|
|
if args.skip_pager: |
|
|
|
|
launch(interpreter, content) |
|
|
|
@ -66,7 +70,8 @@ else:
|
|
|
|
|
|
|
|
|
|
response = yn("Do you want to run this script?") |
|
|
|
|
if response == "y": |
|
|
|
|
print("=" * 20) |
|
|
|
|
print("=" * os.get_terminal_size().columns) |
|
|
|
|
launch(interpreter, content) |
|
|
|
|
else: |
|
|
|
|
print("=" * os.get_terminal_size().columns) |
|
|
|
|
print("Script not run.") |
|
|
|
|