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]
|
||||
(if-let [f (:exec opts)]
|
||||
(f)
|
||||
(if (:clojure opts)
|
||||
(if-let [proc (deps/clojure (:opts opts))]
|
||||
(-> @proc :exit)
|
||||
0)
|
||||
(let [{version-opt :version
|
||||
:keys [:shell-in :edn-in :shell-out :edn-out
|
||||
: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
|
||||
:verbose? :classpath
|
||||
:main :uberscript :describe?
|
||||
:jar :uberjar :clojure] :as opts}
|
||||
:jar :uberjar]}
|
||||
opts
|
||||
_ (when clojure
|
||||
(if-let [proc (deps/clojure (:opts opts))]
|
||||
(-> @proc :exit (System/exit))
|
||||
(System/exit 0)))
|
||||
_ (when verbose? (vreset! common/verbose? true))
|
||||
_ (do ;; set properties
|
||||
(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
|
||||
:main-class main
|
||||
:verbose verbose?}))
|
||||
exit-code)))))
|
||||
exit-code))))))
|
||||
|
||||
(defn main [& args]
|
||||
(let [opts (parse-opts args)]
|
||||
(if-let [do-opts (:do opts)]
|
||||
(reduce (fn [_ opts]
|
||||
;; (prn :opts opts)
|
||||
(let [ret (exec opts)]
|
||||
(if (pos? ret)
|
||||
(reduced ret)
|
||||
|
|
|
|||
Loading…
Reference in a new issue