Add /i switch to xcopy in jpm

This commit is contained in:
Calvin Rose 2019-11-12 02:51:37 -05:00
parent 86d21816b6
commit d71cf093bb
1 changed files with 3 additions and 2 deletions

View File

@ -223,8 +223,9 @@
[src dest]
(print "copying " src " to " dest "...")
(if is-win
(let [end (last (peg/match path-splitter src))]
(shell "xcopy" src (string dest "\\" end) "/y" "/s" "/e"))
(let [end (last (peg/match path-splitter src))
isdir (= (os/stat src :mode) :directory)]
(shell "xcopy" src (if isdir (string dest "\\" end) dest) "/y" "/s" "/e" "/i"))
(shell "cp" "-rf" src dest)))
#