Skip to content

Instantly share code, notes, and snippets.

@kballenegger kballenegger/core.clj Secret
Created Aug 14, 2012

Embed
What would you like to do?
(ns cb.core
(:use [clojure.tools.cli :as cli])
(:gen-class))
(defn -main [& args]
(println args)
(let [[parsed-args _ _] (cli/cli args ["-m" "--main" "Main namespace"])]
(cond (nil? (:main parsed-args)) (println "Nothing to do here...")
:else (do
(println "Executing namespace " (:main parsed-args) ".")
(use (quote [(:main parsed-args) :as the-ns]))
(the-ns/-main)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.