-
-
Save kballenegger/a0d614879581cc06c481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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