diff options
author | Christian Breunig <christian@breunig.cc> | 2023-12-17 08:23:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-17 08:23:24 +0100 |
commit | f991faab2c0d95cbec5d46996b154145955572d7 (patch) | |
tree | 7b6157e73946826cdb4128cf5100ba627934136d /src/helpers/simple-download.py | |
parent | d5375ce02376a91c07ec68f8d410a08dcdc57ef9 (diff) | |
parent | 8809d2e799ae1130b3328b081466b7d772a3da23 (diff) | |
download | vyos-1x-f991faab2c0d95cbec5d46996b154145955572d7.tar.gz vyos-1x-f991faab2c0d95cbec5d46996b154145955572d7.zip |
Merge pull request #2648 from jestabro/sagitta-image-tools
image-tools: T4516: revise system image tools
Diffstat (limited to 'src/helpers/simple-download.py')
-rwxr-xr-x | src/helpers/simple-download.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/helpers/simple-download.py b/src/helpers/simple-download.py new file mode 100755 index 000000000..501af75f5 --- /dev/null +++ b/src/helpers/simple-download.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +import sys +from argparse import ArgumentParser +from vyos.remote import download + +parser = ArgumentParser() +parser.add_argument('--local-file', help='local file', required=True) +parser.add_argument('--remote-path', help='remote path', required=True) + +args = parser.parse_args() + +try: + download(args.local_file, args.remote_path, + check_space=True, raise_error=True) +except Exception as e: + print(e) + sys.exit(1) + +sys.exit() |