Update ls_jar.clj [skip ci]
This commit is contained in:
parent
e667bb5d2f
commit
018e011ee6
1 changed files with 11 additions and 9 deletions
|
|
@ -4,14 +4,16 @@
|
|||
|
||||
(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*)]
|
||||
(let [file (if (= 1 (count *command-line-args*))
|
||||
(io/file (first *command-line-args*))
|
||||
(let [lib (first *command-line-args*)
|
||||
[_org lib-name] (str/split lib #"/")
|
||||
version (second *command-line-args*)]
|
||||
(io/file (System/getProperty "user.home")
|
||||
(format ".m2/repository/%s/%s/%s-%s.jar"
|
||||
(str/replace lib "." (System/getProperty "file.separator"))
|
||||
version
|
||||
lib-name version))))]
|
||||
(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)))))]
|
||||
(.entries (java.util.jar.JarFile. file)))]
|
||||
(println (.getName e))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue