diff options
Diffstat (limited to 'tool/ln_sr.rb')
-rwxr-xr-x | tool/ln_sr.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/ln_sr.rb b/tool/ln_sr.rb index 81fd803355..2aa8391e17 100755 --- a/tool/ln_sr.rb +++ b/tool/ln_sr.rb @@ -3,6 +3,7 @@ target_directory = true noop = false force = false +quiet = false until ARGV.empty? case ARGV[0] @@ -12,6 +13,8 @@ until ARGV.empty? force = true when '-T' target_directory = false + when '-q' + quiet = true else break end @@ -114,6 +117,9 @@ unless respond_to?(:ln_sr) end if File.respond_to?(:symlink) + if quiet and File.identical?(src, dest) + exit + end begin ln_sr(src, dest, verbose: true, target_directory: target_directory, force: force, noop: noop) rescue NotImplementedError, Errno::EPERM, Errno::EACCES |