aboutsummaryrefslogtreecommitdiff
path: root/vo/votools/topcat.cl
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /vo/votools/topcat.cl
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'vo/votools/topcat.cl')
-rw-r--r--vo/votools/topcat.cl43
1 files changed, 43 insertions, 0 deletions
diff --git a/vo/votools/topcat.cl b/vo/votools/topcat.cl
new file mode 100644
index 00000000..a8192fb1
--- /dev/null
+++ b/vo/votools/topcat.cl
@@ -0,0 +1,43 @@
+#{ TOPCAT -- Start or stop the TOPCAT app.
+
+procedure topcat (cmd)
+
+string cmd { prompt = "Command" }
+bool bkg = yes { prompt = "Run in background?" }
+bool verbose = no { prompt = "Print actions?" }
+
+begin
+ string action, command, ch
+ bool verb
+
+
+ if ($nargs > 0)
+ action = cmd
+ else
+ action = "start"
+ verb = verbose
+ command = "!" // osfn ("vo$java/app.topcat")
+
+
+ if (action == "stop" || action == "off") {
+ if (verb)
+ printf ("Stopping Topcat .... ")
+ command = command // " -kill"
+ print (command) | cl(, >& "dev$null")
+
+
+ } else if (action == "status") {
+ command = command // " -status"
+ print (command) | cl()
+
+ } else {
+ # Default is to start the app
+ if (verb)
+ printf ("Starting Topcat .... ")
+ command = command // " -bg"
+ print (command) | cl(, >& "dev$null")
+ }
+
+ if (verb)
+ printf ("\n")
+end