def main():
    args = get_args()
    if args.output:
        output = pathlib.Path(args.output)
        input_paths = get_paths(args.input_path)
        controller.create_tar(output, archive_objects=input_paths)
        print(f'Created tarball from {args.input_path} to {output}')
예제 #2
0
def main():
    args = get_args()
    if args.output:
        output = pathlib.Path(args.output)
        input_path = pathlib.Path(args.input_path)
    else:
        temp = pathlib.Path(args.input_path)
        output = pathlib.Path(f'{temp}.tar')
        input_path = pathlib.Path(args.input_path)
    controller.create_tar(output, archive_objects=[input_path])
    print(f'Created tarball from {input_path} to {output}')