domtool-config: export truststore
[hcoop/domtool2.git] / src / main-config.sml
index 93eef2a..8aacdb0 100644 (file)
@@ -30,9 +30,18 @@ fun println x = (print x; print "\n")
 
 val _ =
     (case CommandLine.arguments () of 
-       ["-path", path] => (case path of
-                               "shared-root" => println Config.sharedRoot
-                             | "local-root" => println Config.localRoot
-                             | "install-prefix" => println Config.installPrefix
-                             | _ => print "Invalid path type\n")
+       ("-path" :: path) => (case path of
+                                 ["shared-root"] => println Config.sharedRoot
+                               | ["local-root"] => println Config.localRoot
+                               | ["install-prefix"] => println Config.installPrefix
+                               | ["cert", path] => (case path of 
+                                                        "ca" => println Config.caDir
+                                                      | "certs" => println Config.certDir
+                                                      | "keys" => println Config.keyDir
+                                                      | "truststore" => println Config.trustStore
+                                                      | _ => println "Invalid cert path type")
+                               | _ => print "Invalid path type\n")
+      | ["-nodes"] => (app (fn (n, _) => (print n; print " ")) Config.nodeIps;
+                      print "\n")
+      | ["-domain"] => println Config.defaultDomain
       | _ => print "Invalid command-line arguments\n")