10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/pakman/finder.rb', line 10
def find_manifests( patterns, excludes=[] )
manifests = []
patterns.each do |pattern|
pattern.gsub!( '\\', '/')
logger.debug "Checking >#{pattern}<"
Dir.glob( pattern ) do |file|
logger.debug " Found manifest candidate >#{file}<"
if File.directory?( file )
logger.debug " Skipping match; it's a directory"
else
unless exclude?( file, excludes )
logger.debug " Adding match >#{file}<"
manifests << [ File.basename( file ), file ]
end
end
end
end
manifests
end
|