(command.CommandList
  children: [
    (C {<set>} {<-euo>} {<pipefail>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SCRIPT_DIR)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Id.Left_DollarParen '$('>
                  child: 
                    (command.AndOr
                      ops: [Id.Op_DAmp]
                      children: [
                        (C {<cd>} 
                          {
                            (DQ 
                              (command_sub
                                left_token: <Id.Left_DollarParen '$('>
                                child: 
                                  (C {<dirname>} 
                                    {
                                      (DQ 
                                        (braced_var_sub
                                          token: <Id.VSub_Name BASH_SOURCE>
                                          bracket_op: (bracket_op.ArrayIndex expr:{<Id.Lit_Digits 0>})
                                        )
                                      )
                                    }
                                  )
                              )
                            )
                          }
                        )
                        (C {<pwd>})
                      ]
                    )
                )
              )
            }
          spids: [96]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:METEOR_WAREHOUSE_DIR)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: <Id.VSub_Name METEOR_WAREHOUSE_DIR>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonHyphen ':-'>
                      arg_word: {($ Id.VSub_DollarName '$HOME') <Id.Lit_Slash '/'> <.meteor>}
                    )
                )
              )
            }
          spids: [123]
        )
      ]
    )
    (command.Simple
      words: [{<echo>} {<-n>} {(DQ <'Finding meteor-tool installation (can take a few seconds)...'>)}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      do_fork: T
    )
    (C {<cd>} {(DQ ($ Id.VSub_DollarName '$SCRIPT_DIR') <'/shell'>)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:METEOR_RELEASE)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    redirects: [
                      (redir
                        op: <Id.Redir_Less '<'>
                        loc: (redir_loc.Fd fd:0)
                        arg: {<'.meteor/release'>}
                      )
                    ]
                    do_fork: F
                  )
              )
            }
          spids: [161]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$METEOR_RELEASE'))} 
                      {<Id.Lit_Equals '='>} {(DQ <'METEOR@1.0.2'>)} {<Id.Lit_RBracket ']'>}
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:TOOL_VERSION)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Pipeline
                            children: [
                              (C {<meteor>} {<show>} {(DQ ($ Id.VSub_DollarName '$METEOR_RELEASE'))})
                              (C {<grep>} {<-o>} {(SQ <'meteor-tool@[0-9a-zA-Z_.-]*'>)})
                            ]
                            negated: F
                          )
                      )
                    }
                  spids: [196]
                )
              ]
            )
          ]
          spids: [168 185]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:TOOL_VERSION)
              op: assign_op.Equal
              rhs: 
                {
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: 
                      (command.Pipeline
                        children: [
                          (C {<meteor>} {<show>} {<--ejson>} {($ Id.VSub_DollarName '$METEOR_RELEASE')})
                          (C {<grep>} {(SQ <'^ *"tool":'>)})
                          (C {<sed>} {<-re>} {(SQ <'s/^.*"(meteor-tool@[^"]*)".*$/\\1/g'>)})
                        ]
                        negated: F
                      )
                  )
                }
              spids: [228]
            )
          ]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TOOLDIR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Pipeline
                    children: [
                      (C {<echo>} {($ Id.VSub_DollarName '$TOOL_VERSION')})
                      (C {<tr>} {<Id.Lit_At '@'>} {<'/'>})
                    ]
                    negated: F
                  )
              )
            }
          spids: [261]
        )
      ]
    )
    (command.Simple
      words: [{<echo>} {(DQ <' '> ($ Id.VSub_DollarName '$TOOL_VERSION'))}]
      redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
      do_fork: T
    )
    (C {<readlink>} {<-f>} 
      {($ Id.VSub_DollarName '$METEOR_WAREHOUSE_DIR') <'/packages/'> ($ Id.VSub_DollarName '$TOOLDIR') 
        <'/mt-os.linux.x86_64/dev_bundle'>
      }
    )
  ]
)