diff options
-rwxr-xr-x | astro/casa/casa-script | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/astro/casa/casa-script b/astro/casa/casa-script new file mode 100755 index 0000000..a1e8e6b --- /dev/null +++ b/astro/casa/casa-script @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Copyright (c) 2017 Aaron LI <aly@aaronly.me> +# MIT License +# +# A wrapper to invoke CASA to execute the supplied script. +# +# Shebang & header +# ---------------- +# #!casa-script +# # -*- mode: python -*- +# +# Command line arguments +# ---------------------- +# if __name__ == "__main__": +# argi = sys.argv.index("--") + 1 +# argv = sys.argv[argi:] +# main(argv) +# +# +# Another more sophisticated wrapper: +# https://github.com/pkgw/pwpy - intfbin/casa-script +# + +if [ $# -eq 0 ] || [ "x$1" == "x-h" ]; then + echo "usage: $(basename $0) <script.py> [ script args ... ]" + exit 1 +fi + +script="$1" +shift +casa --log2term --nologfile --nogui -c ${script} -- "$@" |