(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'vers='> name:vers) op: assign_op.Equal rhs: {<1.4>} spids: [87] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-ne>} {<2>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'Usage: amuFormat.sh <Card Type> <drive>'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'<Card Type> has to be defined in amuFormat.sh itself'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.Simple words: [{<echo>} {(DQ <'<drive> has to be defined in mtools.conf'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [104 118] ) ] else_action: [] redirects: [] ) (C {<echo>} {(DQ <'amuFormat '> ($ Id.VSub_DollarName vers) <' started...'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'drive='> name:drive) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 2))} spids: [167] ) ] redirects: [] ) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{<8MBCARD-FW>}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number 2))} arms: [ (case_arm pat_list: [{<Id.Lit_LBracket '['> <bB> <Id.Lit_RBracket ']'> <Id.Lit_Colon ':'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'drive='> name:drive) op: assign_op.Equal rhs: {(DQ <'f:'>)} spids: [208] ) ] redirects: [] ) ] spids: [202 206 213 -1] ) (case_arm pat_list: [{<Id.Lit_LBracket '['> <cC> <Id.Lit_RBracket ']'> <Id.Lit_Colon ':'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'drive='> name:drive) op: assign_op.Equal rhs: {(DQ <'g:'>)} spids: [222] ) ] redirects: [] ) ] spids: [216 220 227 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'Drive '> ($ Id.VSub_Number 2) <' not supported.'>)}) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [230 231 246 -1] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cylinders='> name:cylinders) op: assign_op.Equal rhs: {<245>} spids: [252] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'heads='> name:heads) op: assign_op.Equal rhs: {<2>} spids: [255] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cluster_size='> name:cluster_size) op: assign_op.Equal rhs: {<8>} spids: [258] ) ] redirects: [] ) ] spids: [181 182 262 -1] ) (case_arm pat_list: [{<32MBCARD-FW>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cylinders='> name:cylinders) op: assign_op.Equal rhs: {<489>} spids: [276] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'heads='> name:heads) op: assign_op.Equal rhs: {<4>} spids: [279] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cluster_size='> name:cluster_size) op: assign_op.Equal rhs: {<4>} spids: [282] ) ] redirects: [] ) ] spids: [264 265 286 -1] ) (case_arm pat_list: [{<64MBCARD-FW>}] action: [ (C {<echo>} {(DQ <'***** WARNING: untested on AvHMU, exiting *****'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cylinders='> name:cylinders) op: assign_op.Equal rhs: {<245>} spids: [304] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'heads='> name:heads) op: assign_op.Equal rhs: {<2>} spids: [307] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cluster_size='> name:cluster_size) op: assign_op.Equal rhs: {<8>} spids: [310] ) ] redirects: [] ) ] spids: [288 289 314 -1] ) (case_arm pat_list: [{<1GBCARD-FW>}] action: [ (C {<echo>} {(DQ <'***** WARNING: untested on AvHMU *****'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cylinders='> name:cylinders) op: assign_op.Equal rhs: {<2327>} spids: [335] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'heads='> name:heads) op: assign_op.Equal rhs: {<16>} spids: [338] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cluster_size='> name:cluster_size) op: assign_op.Equal rhs: {<64>} spids: [341] ) ] redirects: [] ) ] spids: [316 317 345 -1] ) (case_arm pat_list: [{<64MBCARDSAN>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cylinders='> name:cylinders) op: assign_op.Equal rhs: {<489>} spids: [359] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'heads='> name:heads) op: assign_op.Equal rhs: {<8>} spids: [362] ) (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cluster_size='> name:cluster_size) op: assign_op.Equal rhs: {<4>} spids: [365] ) ] redirects: [] ) ] spids: [347 348 369 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<echo>} {(DQ <'Card not supported.'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [380 381 396 -1] ) ] redirects: [] ) (C {<echo>} {(DQ <'Formatting card in slot '> ($ Id.VSub_Number 2) <' as '> ($ Id.VSub_Number 1))}) (C {<mpartition>} {<-I>} {(DQ ($ Id.VSub_DollarName drive))}) (C {<mpartition>} {<-c>} {<-t> ($ Id.VSub_DollarName cylinders)} {<-h> ($ Id.VSub_DollarName heads)} {<-s32>} {<-b32>} {(DQ ($ Id.VSub_DollarName drive))} ) (C {<mformat>} {<-c> ($ Id.VSub_DollarName cluster_size)} {<-v>} {(DQ ($ Id.VSub_Number 1))} {(DQ ($ Id.VSub_DollarName drive))} ) (C {<minfo>} {(DQ ($ Id.VSub_Number 2))}) (C {<mdir>} {(DQ ($ Id.VSub_Number 2))}) (C {<echo>} {(DQ <done.>)}) ] )