1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/un] Support FileUtils.cp_lr

https://github.com/ruby/un/commit/e976ad8a7c
This commit is contained in:
Nobuyoshi Nakada 2022-07-14 09:52:57 +09:00 committed by git
parent 7c58c55c11
commit 025677560a

View file

@ -79,13 +79,15 @@ end
#
# -p preserve file attributes if possible
# -r copy recursively
# -l make hard link instead of copying (implies -r)
# -v verbose
#
def cp
setup("pr") do |argv, options|
setup("prl") do |argv, options|
cmd = "cp"
cmd += "_r" if options.delete :r
cmd = "cp_lr" if options.delete :l
options[:preserve] = true if options.delete :p
dest = argv.pop
argv = argv[0] if argv.size == 1