             [runbld.io :as io]
             [runbld.version :as version]))
 
+(defn windows? []
+  (.startsWith (System/getProperty "os.name") "Windows"))
+
 (def config-file-defaults
   {:es
    {:url "http://localhost:9200"


(defn system-config []
  (io/file
   (if (.startsWith (System/getProperty "os.name") "Windows")
     "c:\\runbld\\runbld.conf"
     "/etc/runbld/runbld.conf")))


    :default (environ/env :job-name)]
   [nil "--java-home PATH" "If different from JAVA_HOME or need to override what will be discovered in PATH"]
   ["-p" "--program PROGRAM" "Program that will run the scriptfile"
    :default (if (windows?) "CMD.EXE" "bash")]
   ["-a" "--args ARGS" "Args to pass PROGRAM"
    :default (if (windows?) ["/C"] ["-x"])
    :parse-fn #(str/split % #" ")]
   [nil "--system-info" "Just dump facts output"]
   ["-h" "--help" "Help me"]])
