Skip to content

Commit e976ad8

Browse files
committed
Support FileUtils.cp_lr
1 parent 3bdb3ff commit e976ad8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/un.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ def setup(options = "", *long_options)
7979
#
8080
# -p preserve file attributes if possible
8181
# -r copy recursively
82+
# -l make hard link instead of copying (implies -r)
8283
# -v verbose
8384
#
8485

8586
def cp
86-
setup("pr") do |argv, options|
87+
setup("prl") do |argv, options|
8788
cmd = "cp"
8889
cmd += "_r" if options.delete :r
90+
cmd = "cp_lr" if options.delete :l
8991
options[:preserve] = true if options.delete :p
9092
dest = argv.pop
9193
argv = argv[0] if argv.size == 1

0 commit comments

Comments
 (0)