babashka/script/built_in.clj

17 lines
582 B
Clojure
Raw Permalink Normal View History

#!/usr/bin/env bb
(ns built-in
(:require [babashka.fs :as fs]
[babashka.process :refer [shell]]))
;; copy clojure spec as built-in
(fs/with-temp-dir [tmp-dir {}]
(let [tmp-dir (fs/file tmp-dir)]
(shell {:dir tmp-dir} "git clone https://github.com/babashka/spec.alpha")
(let [spec-dir (fs/file tmp-dir "spec.alpha")]
2023-01-03 21:03:19 +00:00
(shell {:dir spec-dir} "git reset 951b49b8c173244e66443b8188e3ff928a0a71e7 --hard")
(fs/copy-tree (fs/file spec-dir "src" "main" "clojure") (fs/file "resources" "src" "babashka")
{:replace-existing true}))))