1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-23 06:50:26 +00:00

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

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)))
#