[ruby/un] Support FileUtils.cp_lr
https://github.com/ruby/un/commit/e976ad8a7c
This commit is contained in:
parent
7c58c55c11
commit
025677560a
@ -79,13 +79,15 @@ end
|
|||||||
#
|
#
|
||||||
# -p preserve file attributes if possible
|
# -p preserve file attributes if possible
|
||||||
# -r copy recursively
|
# -r copy recursively
|
||||||
|
# -l make hard link instead of copying (implies -r)
|
||||||
# -v verbose
|
# -v verbose
|
||||||
#
|
#
|
||||||
|
|
||||||
def cp
|
def cp
|
||||||
setup("pr") do |argv, options|
|
setup("prl") do |argv, options|
|
||||||
cmd = "cp"
|
cmd = "cp"
|
||||||
cmd += "_r" if options.delete :r
|
cmd += "_r" if options.delete :r
|
||||||
|
cmd = "cp_lr" if options.delete :l
|
||||||
options[:preserve] = true if options.delete :p
|
options[:preserve] = true if options.delete :p
|
||||||
dest = argv.pop
|
dest = argv.pop
|
||||||
argv = argv[0] if argv.size == 1
|
argv = argv[0] if argv.size == 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user