(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_LIB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4) command_list: (command.CommandList children: [(C {(dirname)} {($ Id.VSub_Number '$0')})] ) ) (/../lib) } spids: [3] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_LIB) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:12) command_list: (command.CommandList children: [(C {(readlink)} {(-f)} {(DQ ($ Id.VSub_DollarName '$BALLS_LIB'))})] ) ) } spids: [11] ) ] ) (command.CommandList children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mode) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [26] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:28) ) (C {(shift)}) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:33) cond: [ (command.Sentence child: (C {(getopts)} {(SQ (Token id:Id.Lit_Chars val:'e:C:' span_id:38))} {(opt)}) terminator: (Token id:Id.Op_Semi val:';' span_id:42) ) ] body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$opt')} arms: [ (case_arm pat_list: [{(C)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_CONF) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [58] ) ] ) ] spids: [54 55 62 -1] ) (case_arm pat_list: [{(e)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_ENV) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [69] ) ] ) ] spids: [65 66 73 -1] ) (case_arm pat_list: [ { (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\?' span_id:76) ) } ] action: [ (C {(echo)} {(DQ ('Usage: ') ($ Id.VSub_Number '$0') (' <mode> [options]'))}) (C {(echo)}) (C {(echo)} {(SQ (Token id:Id.Lit_Chars val:'Options:' span_id:95))}) (C {(echo)} { (SQ (Token id: Id.Lit_Chars val: ' -e <env> the server environment, BALLS_ENV' span_id: 102 ) ) } ) (C {(echo)} { (SQ (Token id: Id.Lit_Chars val: ' default: development' span_id: 109 ) ) } ) (C {(echo)}) (C {(echo)} { (SQ (Token id: Id.Lit_Chars val: ' -C <path> path to the balls conf file, BALLS_CONF' span_id: 119 ) ) } ) (C {(echo)} { (SQ (Token id: Id.Lit_Chars val: ' default: ./config/$BALLS_ENV.sh' span_id: 126 ) ) } ) ] spids: [76 77 130 -1] ) ] ) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_DollarName '$BALLS_ENV'))}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_ENV) op: assign_op.Equal rhs: {(development)} spids: [150] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_DollarName '$BALLS_CONF'))}) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BALLS_CONF) op: assign_op.Equal rhs: {(./config/) ($ Id.VSub_DollarName '$BALLS_ENV') (.sh)} spids: [165] ) ] ) ] ) (C {(.)} {(DQ ($ Id.VSub_DollarName '$BALLS_CONF'))}) (C {(.)} {($ Id.VSub_DollarName '$BALLS_LIB') (/balls.sh)}) (command.Case to_match: {($ Id.VSub_DollarName '$mode')} arms: [ (case_arm pat_list: [{(server)}] action: [(C {(balls) (Id.Lit_Other ':') (Id.Lit_Other ':') ($ Id.VSub_DollarName '$mode')})] spids: [190 191 200 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [(C {(echo)} {(DQ (unknown))})] spids: [203 204 214 -1] ) ] ) ] )