wip [skip ci]

This commit is contained in:
Michiel Borkent 2021-03-17 16:36:25 +01:00
parent 60e25043d4
commit 644634be1d
3 changed files with 5 additions and 5 deletions

View file

@ -708,7 +708,8 @@ Use -- to separate script command line args from bb command line args.
:preloads preloads
:loader (:loader @cp/cp-state)}))))
exec-fn (exec-fn)
exec-src [(sci/binding [sci/file (or @sci/file "<task: >")]
exec-src [(sci/binding [sci/file (or @sci/file "<task>")
core/command-line-args command-line-args]
(sci/eval-string* sci-ctx exec-src))
0]
clojure [nil (if-let [proc (deps/clojure command-line-args)]

View file

@ -3,7 +3,6 @@
[clojure.string :as str]))
(defn bash [& args]
;; (prn :args args)
;; (prn :cmd *command-line-args*)
(-> (p/process ["bash" "-c" (str/join " " args)]
{:inherit true})

View file

@ -7,8 +7,8 @@
:args [-e (apply + (map (fn [i]
(Integer/parseInt i))
*command-line-args*))]}
:tree {:task/type :babashka
:args [:clojure -Stree]}
:describe {:task/type :babashka
:args [:clojure -Sdescribe]}
:do-bash {:task/type :babashka
:args [:do :bash "ls | wc -l"
:__ :eval-plus 1 2 3]}
@ -16,4 +16,4 @@
:args [:do :count-files
:__ :bash "ls | wc -l"
:__ :eval-plus 1 2 3
:__ :tree]}}}
:__ :describe]}}}