 
 
 (defn -main [ & args]
-  (let [cmd (first args)
-        args (next args)]
+  (let [[options extra-args]
+        (cli args ["-f" "--file" "Which control file to be executed."])
+        {:keys [file]} options
+        cmd (first extra-args)
+        args (next extra-args)]
+    (when file
+      (reset! special-control-file file))
     (case cmd
       "init" (apply init args)
       "run" (apply run args)

        [clojure.tools.cli :only [cli]]
        [clojure.java.io :only [file reader writer]])
  (:gen-class))

(def ^{:private true :tag String} CONTROL-DIR "clojure-control.original.pwd")




(defn print-help []
  (println "Usage:control [-f control.clj] command args")
  (println "Commands available:")
  (println "init                           Initialize clojure-control, create a sample control file in current folder")
  (println "run <cluster> <task> <args>    Run user-defined clojure-control tasks against certain cluster")
  (println "show <cluster>                 Show cluster info")
