Created
February 24, 2016 07:54
-
-
Save lihei12345/31e91e747d16aa2d304f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
path = os.path.expanduser('~') + '/Library/MobileDevice/Provisioning Profiles' | |
cmd_path = os.path.expanduser('~') + '/Library/MobileDevice/Provisioning\ Profiles' | |
provision_files = [x for x in os.listdir(path) if os.path.splitext(x)[1]==".mobileprovision"] | |
output_path = os.path.expanduser('~') + '/Desktop/provision_infos' | |
if not os.path.exists(output_path): | |
os.mkdir(output_path) | |
for provision in provision_files: | |
file_name = os.path.basename(provision) | |
cmd = 'security cms -D -i ' + cmd_path + '/' + provision + ' > ' + output_path + '/' + file_name + '.plist' | |
os.system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment