From 025677560a477c5d54f6a199447b4c92f367cd39 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 14 Jul 2022 09:52:57 +0900 Subject: [PATCH] [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 # # -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