 (defn exit! [status msg]
   "Print message and System/exit with status code"
   (cli/output msg)
-  (System/exit status))
+  ;; (System/exit status)
+  )
 
 (defn -main
   [& args]


(defn upload
  ""
  [base-url target-dir {:keys [find-id path]}]
  (cli/output 0 (str "Uploading " path))
  (let [files (.listFiles (io/file (str target-dir (File/separator) path)))]
    (cli/output 0 (str "found " (count files) " files"))
    (doseq [f files]
      (upload-node base-url path find-id (to-zip (slurp f))))))

(defn run
  "App logic. Returns nil."

    nil))

(def config
  {:configurationMap {:find-elements [:map]
                      :find-id [(fn [_] nil)]
                      :find-name [(fn [_] "configurationMap")]
                      :path "server/configurationMap"}

   :codeTemplate {:find-elements [:list :codeTemplate]
                  :find-id [:id zip/down zip/node]
                  :find-name [:name zip/down zip/node]
                  :path "codeTemplates"}

   :globalScripts {:find-elements [:map]
                   :find-id [(fn [_] nil)]
                   :find-name [(fn [_] "globalScripts")]
                   :path "server/globalScripts"}

   :channelGroup {:find-elements [:list :channelGroup]
                  :find-id [:id zip/down zip/node]
                  :find-name [:name zip/down zip/node]
                  :path "channelgroups"
                  :prevent-push true}

   :channel {:find-elements [:list :channel]
             :find-id [:id zip/down zip/node]
             :find-name [:name zip/down zip/node]
             :path "channels"}
   })


