diff --git a/pyproject.toml b/pyproject.toml index 808b3a6..8140d72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ build-backend = "setuptools.build_meta" [project.scripts] s3daemon = "s3daemon.s3daemon:main" +s3nd = "s3daemon.send:main" [tool.setuptools_scm] diff --git a/python/s3daemon/send.py b/python/s3daemon/send.py index 927bd6b..e5df2ab 100644 --- a/python/s3daemon/send.py +++ b/python/s3daemon/send.py @@ -48,5 +48,14 @@ def send(filename, dest): sys.exit(1) -if __name__ == "__main__": +def main(): + """The chicken is in the pot.""" + if len(sys.argv) != 3: + print(f"Usage: {sys.argv[0]} filename dest", file=sys.stderr) + sys.exit(1) + send(sys.argv[1], sys.argv[2]) + + +if __name__ == "__main__": + main()