diff options
| author | crupest <crupest@outlook.com> | 2022-11-01 21:25:43 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-11-01 21:25:43 +0800 | 
| commit | ec63847055470dfa3e71bd63a3a8c5a5bc1aa1ba (patch) | |
| tree | 3c70f0e60095782da3630feabc160a4d0ae5feef /tool/download.py | |
| parent | 94a710566460a6d22520029f6d48fbdfeddf2c67 (diff) | |
| download | crupest-ec63847055470dfa3e71bd63a3a8c5a5bc1aa1ba.tar.gz crupest-ec63847055470dfa3e71bd63a3a8c5a5bc1aa1ba.tar.bz2 crupest-ec63847055470dfa3e71bd63a3a8c5a5bc1aa1ba.zip | |
...
Diffstat (limited to 'tool/download.py')
| -rwxr-xr-x | tool/download.py | 27 | 
1 files changed, 0 insertions, 27 deletions
| diff --git a/tool/download.py b/tool/download.py deleted file mode 100755 index a77daa1..0000000 --- a/tool/download.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env python3 - -import os.path - -SCRIPTS = [("docker-mailserver setup script", "docker-mailserver-setup.sh", -            "https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/setup.sh")] - -this_script_dir = os.path.dirname(os.path.relpath(__file__)) - -for script in SCRIPTS: -    name, filename, url = script -    path = os.path.join(this_script_dir, filename) -    skip = False -    if os.path.exists(path): -        print(f"{name} already exists, download and overwrite? (y/N)", end=" ") -        if input() != "y": -            skip = True -    else: -        print(f"Download {name} to {path}? (Y/n)", end=" ") -        if input() == "n": -            skip = True -    if not skip: -        print(f"Downloading {name}...") -        os.system(f"curl -s {url} > {path} && chmod +x {path}") -        print(f"Downloaded {name} to {path}.") -    else: -        print(f"Skipped {name}.") | 
