]> git.saurik.com Git - apple/security.git/blob - certificates/ota_cert_tool/Scripts/BuildAsset.rb
Security-57031.30.12.tar.gz
[apple/security.git] / certificates / ota_cert_tool / Scripts / BuildAsset.rb
1 #
2 # BuildAsset.rb
3 # ios_ota_cert_tool
4 #
5 # Copyright 2012 Apple Inc. All rights reserved.
6 #
7
8 require "FileUtils"
9
10 build_dir = ENV["BUILT_PRODUCTS_DIR"]
11 project_dir = ENV["PROJECT_DIR"]
12 input_path = File.expand_path("~/tmp/asset_out")
13 output_path = File.join(build_dir, "Asset")
14 script_path = File.join(project_dir, "Scripts/File.rb")
15 staging_path = File.expand_path("~/tmp/staging")
16 asset_name = "com_apple_MobileAsset_PKITrustServices_PKITrustData"
17 full_asset_path = File.join(staging_path, asset_name)
18
19
20 require script_path
21
22
23 puts "Creating the BuildPKIAsset instance"
24 b = BuildPKIAsset.new(input_path, output_path, staging_path)
25 puts "Calling stage on the BuildPKIAsset instance"
26 b.stage
27 puts "Calling stage on the BuildPKIAsset sign"
28 b.sign
29
30 puts "Finished with BuildPKIAsset"
31
32 puts "build_dir = #{build_dir}"
33 puts "full_asset_path = #{full_asset_path}"
34
35 FileUtils.cp_r(full_asset_path, build_dir)
36
37 puts "That's all folks!"
38
39