-
-(defn run-cmd
- [command]
- (->> command
- p/process
- :out
- slurp))
-
-(defn extract-file-from-zip
- [zip-file-name source destination]
- (let [zip-file (io/file zip-file-name)
- src (io/file source)
- dest (io/file destination)
- fs (FileSystems/newFileSystem (.toPath zip-file) nil)
- file-in-zip (.getPath fs source (into-array String []))]
- (Files/copy file-in-zip (.toPath dest)
- (into-array CopyOption []))))
-