|
|
|
@ -3,8 +3,8 @@ import click |
|
|
|
|
import backupill as bp |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@click.argument("file", required=True) |
|
|
|
|
@click.version_option(version=bp.__version__) |
|
|
|
|
@click.option("-f", "--file", help="ASC (.asc) file path.") |
|
|
|
|
@click.command(context_settings=dict(help_option_names=["-h", "--help"])) |
|
|
|
|
def main(file): |
|
|
|
|
""" |
|
|
|
@ -15,13 +15,13 @@ def main(file): |
|
|
|
|
|
|
|
|
|
if file: |
|
|
|
|
if not os.path.isfile(file): |
|
|
|
|
click.echo("File '{}' not found!".format(file)) |
|
|
|
|
click.echo("Error: File '{}' not found!".format(file)) |
|
|
|
|
exit() |
|
|
|
|
|
|
|
|
|
bp.generate_backup(file) |
|
|
|
|
click.echo("Done!") |
|
|
|
|
else: |
|
|
|
|
click.echo("Usage: packupill -f FILENAME.asc") |
|
|
|
|
click.echo("Usage: packupill FILENAME.asc") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
|