]> git.saurik.com Git - apple/security.git/blob - certificates/CertificateTool/BuildiOSAsset/BuildPListFiles.rb
Security-57031.1.35.tar.gz
[apple/security.git] / certificates / CertificateTool / BuildiOSAsset / BuildPListFiles.rb
1 #
2 # BuildPListFiles.rb
3 # CertificateTool
4 #
5 # Copyright 2012 Apple Inc. All rights reserved.
6 #
7
8 @verbose = false
9
10 def do_output_str(str, header = false)
11 return if !@verbose
12
13 puts "=====================================================" if header
14 puts str if !str.nil?
15 end
16
17 do_output_str(nil, true)
18 do_output_str(" ")
19 do_output_str "Entering BuildPlistFiles.rb"
20 do_output_str(nil, true)
21 do_output_str(" ")
22
23 build_dir = ENV["BUILT_PRODUCTS_DIR"]
24 sdk_name = ENV["SDK_NAME"]
25 top_level_directory = ENV["PROJECT_DIR"]
26
27 do_output_str(nil, true)
28 do_output_str("Environment variables")
29 do_output_str(" ")
30
31 do_output_str "build_dir = #{build_dir}"
32 do_output_str "sdk_name = #{sdk_name}"
33 do_output_str "top_level_directory = #{top_level_directory}"
34 do_output_str(nil, true)
35 do_output_str(" ")
36
37 top_level_directory = File.join(top_level_directory, "..")
38 output_directory = File.join(build_dir, "asset_out")
39 tool_path = File.join(build_dir, "CertificateTool")
40
41 do_output_str(nil, true)
42 do_output_str("Path variables")
43 do_output_str "top_level_directory = #{top_level_directory}"
44 do_output_str "output_directory = #{output_directory}"
45 do_output_str "tool_path = #{tool_path}"
46 do_output_str(nil, true)
47 do_output_str(" ")
48
49 cmd_str = tool_path + " --top_level_directory " + "'" + top_level_directory + "' " + " --output_directory " + "'" + output_directory + "'"
50 do_output_str(nil, true)
51 do_output_str "Executing command: #{cmd_str}"
52 do_output_str(nil, true)
53 do_output_str(" ")
54
55 `#{cmd_str}`
56
57 do_output_str(nil, true)
58 do_output_str "Completed BuildPlistFiles.rb"
59 do_output_str(nil, true)
60 do_output_str(" ")
61
62
63