Skip to content

Commit

Permalink
fixes #18: make CopyFiles and ShellScript build phase more unique
Browse files Browse the repository at this point in the history
  • Loading branch information
临寒 committed Feb 19, 2015
1 parent 5791ab7 commit 89a7571
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xUnique.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __set_to_result(self, parent_hex, current_hex, current_path_key):
current_node = self.nodes[current_hex]
isa_type = current_node['isa']
if isinstance(current_path_key, (list, tuple)):
current_path = '/'.join([current_node[i] for i in current_path_key])
current_path = '/'.join([str(current_node[i]) for i in current_path_key])
elif isinstance(current_path_key, (basestring, unicode)):
if current_path_key in current_node.keys():
current_path = current_node[current_path_key]
Expand Down Expand Up @@ -407,7 +407,11 @@ def __unique_build_phase(self, parent_hex, build_phase_hex):
# no useful key in some build phase types, use its isa value
bp_type = current_node['isa']
if bp_type == 'PBXShellScriptBuildPhase':
cur_path_key = 'name'
cur_path_key = 'shellScript'
elif bp_type =='PBXCopyFilesBuildPhase':
cur_path_key = ['name','dstSubfolderSpec','dstPath']
if not current_node.get('name'):
del cur_path_key[0]
else:
cur_path_key = bp_type
self.__set_to_result(parent_hex, build_phase_hex, cur_path_key)
Expand Down

0 comments on commit 89a7571

Please sign in to comment.