(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH) op: assign_op.Equal rhs: {<'/bin'> <Id.Lit_Colon ':'> <'/sbin'> <Id.Lit_Colon ':'> <'/usr/bin'> <Id.Lit_Colon ':'> <'/usr/sbin'> } spids: [4] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PI) op: assign_op.Equal rhs: {<.postinstall>} spids: [13] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INFO) op: assign_op.Equal rhs: {<.minixpackage>} spids: [16] ) ] ) (C {<set>} {<-e>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dir) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<sed>} {(SQ <'s/\\/*$//'>)}) ] negated: F ) ) } spids: [31] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-ne>} {<2>} {<Id.Lit_RBracket ']'>}) ] ) action: [ (C {<echo>} {(DQ <'Usage: '> ($ Id.VSub_Number '$0') <' sourcedir packagedir'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [53 65] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ ($ Id.VSub_DollarName '$dir'))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} {(DQ <'Error: '> ($ Id.VSub_DollarName '$dir') <' isn\'t a directory.'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [83 97] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:here) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_Backtick '`'> child:(C {<pwd>}))} spids: [115] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$dir'))} arms: [ (case_arm pat_list: [{<'/'> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:srcdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$dir'))} spids: [135] ) ] ) ] spids: [131 133 140 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:srcdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$here') <'/'> ($ Id.VSub_DollarName '$dir'))} spids: [145] ) ] ) ] spids: [142 143 152 -1] ) ] ) (command.Case to_match: {($ Id.VSub_Number '$2')} arms: [ (case_arm pat_list: [{<'/'> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [167] ) ] ) ] spids: [163 165 172 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$here') <'/'> ($ Id.VSub_Number '$2'))} spids: [177] ) ] ) ] spids: [174 175 184 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:packagestart) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$srcdir') <'/now'>} spids: [189] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:findlist) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$srcdir') <'/findlist'>} spids: [193] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tar) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$srcdir') <'/'> (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<basename>} {(${ Id.VSub_Name dir)}) ) ) <.tar> } spids: [197] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tarbz) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$tar') <.bz2>} spids: [213] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [{<mkdir>} {($ Id.VSub_DollarName '$pdir')}] redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})] do_fork: T ) (C {<true>}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:binsizes) op: assign_op.Equal rhs: {<big>} spids: [229] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rc) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$dir') <'/.binpackage'>} spids: [232] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$rc')} {<Id.Lit_RBracket ']'>}) ] ) action: [(C {<.>} {($ Id.VSub_DollarName '$rc')})] spids: [236 246] ) ] ) (C {<binsizes>} {($ Id.VSub_DollarName '$binsizes')}) (C {<touch>} {($ Id.VSub_DollarName '$packagestart')}) (C {<sleep>} {<1>}) (C {<cd>} {($ Id.VSub_DollarName '$dir')}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {<build>} {<-a>} {<Id.KW_Bang '!'>} {<-f>} {<build.minix>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} {(DQ <'Error: No build or build.minix script in '> ($ Id.VSub_DollarName '$dir') <.>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [271 291] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [(C {<Id.Lit_LBracket '['>} {<-f>} {<build.minix>} {<Id.Lit_RBracket ']'>})] ) action: [(C {<sh>} {<-e>} {<build.minix>})] spids: [309 319] ) ] else_action: [(C {<sh>} {<-e>} {<build>})] ) (C {<echo>} {(DQ <' * Building package'>)}) (command.Simple words: [ {<echo>} { (DQ <'Minix package '> ($ Id.VSub_DollarName '$dir') <' built '> (command_sub left_token:<Id.Left_Backtick '`'> child:(C {<date>})) <.> ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$INFO')} ) ] do_fork: T ) (command.Pipeline children: [ (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {<echo>} {($ Id.VSub_DollarName '$INFO')}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName '$PI')} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (C {<echo>} {($ Id.VSub_DollarName '$PI')}) terminator: <Id.Op_Semi _> ) ] spids: [369 380] ) ] ) terminator: <Id.Op_Semi _> ) (command.Pipeline children: [ (C {<find>} {<'/'>} {<-cnewer>} {($ Id.VSub_DollarName '$packagestart')}) (C {<egrep>} {<-v>} { (DQ <'^('> ($ Id.VSub_DollarName '$srcdir') < '|/(dev|tmp)|/usr/(src|tmp|log|adm|run)|/home|/etc/utmp|/var/(run|log|spool))' > ) } ) (C {<fgrep>} {<-v>} {<'/.svn'>}) ] negated: F ) ] ) ) (C {<pax>} {<-w>} {<-d>}) (command.Simple words: [{<bzip2>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {($ Id.VSub_DollarName '$tarbz')} ) ] do_fork: T ) ] negated: F ) (C {<rm>} {<-f>} {($ Id.VSub_DollarName '$packagestart')} {($ Id.VSub_DollarName '$findlist')} {($ Id.VSub_DollarName '$tarcmd')} ) (C {<binsizes>} {<normal>}) (C {<mv>} {($ Id.VSub_DollarName '$tarbz')} {($ Id.VSub_DollarName '$pdir')}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )