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]
|
(require '[clojure.java.io :as io]
|
||||||
'[clojure.string :as str])
|
'[clojure.string :as str])
|
||||||
|
(let [file (if (= 1 (count *command-line-args*))
|
||||||
(let [lib (first *command-line-args*)
|
(io/file (first *command-line-args*))
|
||||||
[_org lib-name] (str/split lib #"/")
|
(let [lib (first *command-line-args*)
|
||||||
version (second *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
|
(doseq [e (enumeration-seq
|
||||||
(.entries (java.util.jar.JarFile.
|
(.entries (java.util.jar.JarFile. file)))]
|
||||||
(io/file (System/getProperty "user.home")
|
|
||||||
(format ".m2/repository/%s/%s/%s-%s.jar"
|
|
||||||
lib version
|
|
||||||
lib-name version)))))]
|
|
||||||
(println (.getName e))))
|
(println (.getName e))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue