From aeb2d49a746b5eb1bf9e4fc1eba2d9860838ba36 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 2 Jul 2017 19:39:28 +0800 Subject: Add a simple casa-script wrapper for CASA --- astro/casa/casa-script | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 astro/casa/casa-script 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 +# 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 args ... ]" + exit 1 +fi + +script="$1" +shift +casa --log2term --nologfile --nogui -c ${script} -- "$@" -- cgit v1.2.2