(command.CommandList children: [ (C {<Id.KW_Set set>} {<-eu>}) (command.ShFunction name: make_helper body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'containing_dir='> (DQ (${ Id.VSub_Number 1))}) (C {<local>} {<Id.Lit_VarLike 'app_name='> (DQ (${ Id.VSub_Number 2))}) (C {<local>} {<Id.Lit_VarLike 'feature='> (DQ (${ Id.VSub_Number 3))}) (C {<local>} {<Id.Lit_VarLike 'flags='> (DQ (${ Id.VSub_Number 4))}) (C {<local>} {<Id.Lit_VarLike 'helper_name='> (DQ (${ Id.VSub_Name app_name) <' Helper'>)}) (C {<local>} {<Id.Lit_VarLike 'helper_stem='> (DQ (${ Id.VSub_Name containing_dir) <'/'> (${ Id.VSub_Name helper_name)) } ) (C {<local>} {<Id.Lit_VarLike 'original_helper='> (DQ (${ Id.VSub_Name helper_stem) <.app>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalNot child: (bool_expr.Unary op_id: Id.BoolUnary_d child: {(DQ (${ Id.VSub_Name original_helper))} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Number 0) <': error: '> (${ Id.VSub_Name original_helper) <' is a required directory'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [152 169] ) ] ) (C {<local>} {<Id.Lit_VarLike 'original_helper_exe='> (DQ (${ Id.VSub_Name original_helper) <'/Contents/MacOS/'> (${ Id.VSub_Name helper_name) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalNot child: (bool_expr.Unary op_id: Id.BoolUnary_f child: {(DQ (${ Id.VSub_Name original_helper_exe))} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Number 0) <': error: '> (${ Id.VSub_Name original_helper_exe) <' is a required file'> ) } ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [212 229] ) ] ) (C {<local>} {<Id.Lit_VarLike 'feature_helper='> (DQ (${ Id.VSub_Name helper_stem) <' '> (${ Id.VSub_Name feature) <.app>) } ) (C {<rsync>} {<-acC>} {<--delete>} {<--include>} {(SQ <'*.so'>)} {(DQ (${ Id.VSub_Name original_helper) <'/'>)} {(DQ (${ Id.VSub_Name feature_helper))} ) (C {<local>} {<Id.Lit_VarLike 'helper_feature='> (DQ (${ Id.VSub_Name helper_name) <' '> (${ Id.VSub_Name feature)) } ) (C {<local>} {<Id.Lit_VarLike 'helper_feature_exe='> (DQ (${ Id.VSub_Name feature_helper) <'/Contents/MacOS/'> (${ Id.VSub_Name helper_feature) ) } ) (C {<mv>} { (DQ (${ Id.VSub_Name feature_helper) <'/Contents/MacOS/'> (${ Id.VSub_Name helper_name)) } {(DQ (${ Id.VSub_Name helper_feature_exe))} ) (C {<local>} {<Id.Lit_VarLike 'change_flags='> (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<dirname>} {(DQ (${ Id.VSub_Number 0))}) ) <'/change_mach_o_flags.py'> ) } ) (C {(DQ (${ Id.VSub_Name change_flags))} {(${ Id.VSub_Name flags)} {(DQ (${ Id.VSub_Name helper_feature_exe))} ) (C {<local>} {<Id.Lit_VarLike 'feature_info='> (DQ (${ Id.VSub_Name feature_helper) <'/Contents/Info'>) } ) (C {<local>} {<Id.Lit_VarLike 'feature_info_plist='> (DQ (${ Id.VSub_Name feature_info) <.plist>)} ) (C {<defaults>} {<write>} {(DQ (${ Id.VSub_Name feature_info))} {(DQ <CFBundleDisplayName>)} {(DQ (${ Id.VSub_Name helper_feature))} ) (C {<defaults>} {<write>} {(DQ (${ Id.VSub_Name feature_info))} {(DQ <CFBundleExecutable>)} {(DQ (${ Id.VSub_Name helper_feature))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cfbundleid) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<defaults>} {<read>} {(DQ (${ Id.VSub_Name feature_info))} {(DQ <CFBundleIdentifier>)} ) ) ) } spids: [451] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:feature_cfbundleid) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name cfbundleid) <.> (${ Id.VSub_Name feature))} spids: [471] ) ] ) (C {<defaults>} {<write>} {(DQ (${ Id.VSub_Name feature_info))} {(DQ <CFBundleIdentifier>)} {(DQ (${ Id.VSub_Name feature_cfbundleid))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cfbundlename) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<defaults>} {<read>} {(DQ (${ Id.VSub_Name feature_info))} {(DQ <CFBundleName>)} ) ) ) } spids: [505] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:feature_cfbundlename) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name cfbundlename) <' '> (${ Id.VSub_Name feature))} spids: [525] ) ] ) (C {<defaults>} {<write>} {(DQ (${ Id.VSub_Name feature_info))} {(DQ <CFBundleName>)} {(DQ (${ Id.VSub_Name feature_cfbundlename))} ) (C {<plutil>} {<-convert>} {<xml1>} {(DQ (${ Id.VSub_Name feature_info_plist))}) (C {<chmod>} {<a> <Id.Lit_Other '+'> <r>} {(DQ (${ Id.VSub_Name feature_info_plist))}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_ne left: {(${ Id.VSub_Pound '#')} right: {<2>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [ {<echo>} {(DQ <'usage: '> (${ Id.VSub_Number 0) <' <directory_within_contents> <app_name>'>)} ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [604 619] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DIRECTORY_WITHIN_CONTENTS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [644] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:APP_NAME) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [651] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CONTENTS_DIR) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name BUILT_PRODUCTS_DIR) <'/'> (${ Id.VSub_Name CONTENTS_FOLDER_PATH))} spids: [659] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CONTAINING_DIR) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name CONTENTS_DIR) <'/'> (${ Id.VSub_Name DIRECTORY_WITHIN_CONTENTS))} spids: [670] ) ] ) (C {<make_helper>} {(DQ (${ Id.VSub_Name CONTAINING_DIR))} {(DQ (${ Id.VSub_Name APP_NAME))} {(DQ <EH>)} {(DQ <--executable-heap>)} ) (C {<make_helper>} {(DQ (${ Id.VSub_Name CONTAINING_DIR))} {(DQ (${ Id.VSub_Name APP_NAME))} {(DQ <NP>)} {(DQ <--no-pie>)} ) ] )