ruby-changes:72545
From: Nobuyoshi <ko1@a...>
Date: Thu, 14 Jul 2022 16:26:56 +0900 (JST)
Subject: [ruby-changes:72545] 025677560a (master): [ruby/un] Support `FileUtils.cp_lr`
https://git.ruby-lang.org/ruby.git/commit/?id=025677560a From 025677560a477c5d54f6a199447b4c92f367cd39 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Thu, 14 Jul 2022 09:52:57 +0900 Subject: [ruby/un] Support `FileUtils.cp_lr` https://github.com/ruby/un/commit/e976ad8a7c --- lib/un.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/un.rb b/lib/un.rb index 5feac92120..9242357215 100644 --- a/lib/un.rb +++ b/lib/un.rb @@ -79,13 +79,15 @@ end https://github.com/ruby/ruby/blob/trunk/lib/un.rb#L79 # # -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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/