9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/cocoapods-remove-duplicates/native/installer.rb', line 9
def install_pod_sources
old_install_pod_sources
lib_paths = (`find '#{self.sandbox.root}' -type f -name *.a -o -name *.framework`).split("\n")
lib_hash = Hash.new
lib_paths.each do |path|
lib_name = File::basename(path)
if lib_hash.has_key?(lib_name)
if File.exist?(path)
File.delete(path)
Pod::UI.puts "移除重复库: #{lib_name}\t\t路径: #{path}"
end
else
lib_hash[lib_name] = path
end
end
end
|