wip
This commit is contained in:
parent
4d77ee6446
commit
55f38db119
1 changed files with 176 additions and 175 deletions
|
|
@ -522,6 +522,10 @@ Use -- to separate script command line args from bb command line args.
|
||||||
sci/ns @sci/ns]
|
sci/ns @sci/ns]
|
||||||
(if-let [f (:exec opts)]
|
(if-let [f (:exec opts)]
|
||||||
(f)
|
(f)
|
||||||
|
(if (:clojure opts)
|
||||||
|
(if-let [proc (deps/clojure (:opts opts))]
|
||||||
|
(-> @proc :exit)
|
||||||
|
0)
|
||||||
(let [{version-opt :version
|
(let [{version-opt :version
|
||||||
:keys [:shell-in :edn-in :shell-out :edn-out
|
:keys [:shell-in :edn-in :shell-out :edn-out
|
||||||
:help? :file :command-line-args
|
:help? :file :command-line-args
|
||||||
|
|
@ -529,12 +533,8 @@ Use -- to separate script command line args from bb command line args.
|
||||||
:repl :socket-repl :nrepl
|
:repl :socket-repl :nrepl
|
||||||
:verbose? :classpath
|
:verbose? :classpath
|
||||||
:main :uberscript :describe?
|
:main :uberscript :describe?
|
||||||
:jar :uberjar :clojure] :as opts}
|
:jar :uberjar]}
|
||||||
opts
|
opts
|
||||||
_ (when clojure
|
|
||||||
(if-let [proc (deps/clojure (:opts opts))]
|
|
||||||
(-> @proc :exit (System/exit))
|
|
||||||
(System/exit 0)))
|
|
||||||
_ (when verbose? (vreset! common/verbose? true))
|
_ (when verbose? (vreset! common/verbose? true))
|
||||||
_ (do ;; set properties
|
_ (do ;; set properties
|
||||||
(when main (System/setProperty "babashka.main" main))
|
(when main (System/setProperty "babashka.main" main))
|
||||||
|
|
@ -699,12 +699,13 @@ Use -- to separate script command line args from bb command line args.
|
||||||
:classpath classpath
|
:classpath classpath
|
||||||
:main-class main
|
:main-class main
|
||||||
:verbose verbose?}))
|
:verbose verbose?}))
|
||||||
exit-code)))))
|
exit-code))))))
|
||||||
|
|
||||||
(defn main [& args]
|
(defn main [& args]
|
||||||
(let [opts (parse-opts args)]
|
(let [opts (parse-opts args)]
|
||||||
(if-let [do-opts (:do opts)]
|
(if-let [do-opts (:do opts)]
|
||||||
(reduce (fn [_ opts]
|
(reduce (fn [_ opts]
|
||||||
|
;; (prn :opts opts)
|
||||||
(let [ret (exec opts)]
|
(let [ret (exec opts)]
|
||||||
(if (pos? ret)
|
(if (pos? ret)
|
||||||
(reduced ret)
|
(reduced ret)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue