ls_jar.clj example
This commit is contained in:
parent
05860ae96c
commit
e75982a645
1 changed files with 17 additions and 0 deletions
17
examples/ls_jar.clj
Executable file
17
examples/ls_jar.clj
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
;; usage: ls_jar.clj borkdude/sci 0.0.13-alpha.24
|
||||
|
||||
(require '[clojure.java.io :as io]
|
||||
'[clojure.string :as str])
|
||||
|
||||
(let [lib (first *command-line-args*)
|
||||
[_org lib-name] (str/split lib #"/")
|
||||
version (second *command-line-args*)]
|
||||
(doseq [e (enumeration-seq
|
||||
(.entries (java.util.jar.JarFile.
|
||||
(io/file (System/getProperty "user.home")
|
||||
(format ".m2/repository/%s/%s/%s-%s.jar"
|
||||
lib version
|
||||
lib-name version)))))]
|
||||
(println (.getName e))))
|
||||
Loading…
Reference in a new issue