mirror of
https://github.com/urbit/shrub.git
synced 2024-12-21 18:01:32 +03:00
a539d986a7
In favor of [type] syntax. Turns a bunch of ++ into +$ along the way.
18 lines
388 B
Plaintext
18 lines
388 B
Plaintext
:: Kiln: copy file in clay
|
|
::
|
|
:::: /hoon/cp/hood/gen
|
|
::
|
|
/? 310
|
|
:- %say
|
|
=, space:userlib
|
|
|= [^ [input=path output=path ~] ~]
|
|
:- %kiln-info
|
|
?. =(-:(flop input) -:(flop output))
|
|
["Can't move to a different mark" ~]
|
|
=+ dir=.^(arch %cy input)
|
|
?~ fil.dir
|
|
~& "No such file:"
|
|
[<input> ~]
|
|
:- "copied"
|
|
`(foal output -:(flop input) [%atom %t ~] .^(* %cx input)) :: XX type
|