зеркало из https://github.com/github/ruby.git
Quiet if the target is already linked the same source
This commit is contained in:
Родитель
55e540f7ab
Коммит
9de11fe796
|
@ -607,7 +607,7 @@ CP_R = #{config_string('CP')} -r
|
|||
|
||||
gemlib = $(TARGET_TOPDIR)/gems/$(gem)/lib
|
||||
gemlib:#{%{ $(gemlib)\n$(gemlib): $(gem_srcdir)/lib} if $nmake}
|
||||
$(Q) #{@inplace ? '$(NULLCMD) ' : ''}$(RUBY) $(top_srcdir)/tool/ln_sr.rb -f -T $(gem_srcdir)/lib $(gemlib)
|
||||
$(Q) #{@inplace ? '$(NULLCMD) ' : ''}$(RUBY) $(top_srcdir)/tool/ln_sr.rb -q -f -T $(gem_srcdir)/lib $(gemlib)
|
||||
|
||||
clean-gemlib:
|
||||
$(Q) $(#{@inplace ? 'NULLCMD' : 'RM_RF'}) $(gemlib)
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче