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:
parent
7c58c55c11
commit
025677560a
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue