[iOS8] fix a bug which invalid template path would be generated

If specify template with `rake profile template="XXXX"',
it will generate invalid template path which contains unnecessary `"' as following.

		<key>XrayTemplatePath</key>
		<string>"/Applications/Xcode6-Beta5.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate</string>
This commit is contained in:
Watson
2014-08-18 12:26:12 +09:00
parent ec3e808e3d
commit a7dd9c405b

View File

@@ -301,7 +301,7 @@ EOS
if File.exist?(template)
template_path = template
elsif !builtin_templates.grep(/#{template}/i).empty?
list = `/usr/bin/xcrun instruments -s 2>&1`.strip.split("\n").map { |line| line.sub(/^\s+"/, '').sub(/",*$/, '') }
list = `/usr/bin/xcrun instruments -s 2>&1`.strip.split("\n").map { |line| line.sub(/^\s*"/, '').sub(/",*$/, '') }
template = template.downcase
template_path = list.find { |path| File.basename(path, File.extname(path)).downcase == template }
else