578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
|
# File 'lib/autobuild/environment.rb', line 578
def each_env_search_path(prefix, patterns)
arch_names = self.arch_names
arch_size = self.arch_size
seen = Set.new
patterns.each do |base_path|
paths = []
if base_path =~ /ARCHSIZE/
base_path = base_path.gsub('ARCHSIZE', arch_size.to_s)
end
if base_path =~ /ARCH/
arch_names.each do |arch|
paths << base_path.gsub('ARCH', arch)
end
else
paths << base_path
end
paths.each do |p|
p = File.join(prefix, *p.split('/'))
if !seen.include?(p) && File.directory?(p)
yield(p)
seen << p
end
end
end
end
|