(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.LogicalAnd
                          left: (bool_expr.Unary op_id:Id.BoolUnary_n child:{($ Id.VSub_Number '$1')})
                          right: 
                            (bool_expr.Binary
                              op_id: Id.BoolBinary_GlobEqual
                              left: {(DQ ($ Id.VSub_Number '$1'))}
                              right: {<overwrite>}
                            )
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:OVERW)
                  op: assign_op.Equal
                  rhs: {(DQ <true>)}
                  spids: [27]
                )
              ]
            )
          ]
          spids: [3 24]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHCOMMON)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                <
'-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o VerifyHostKeyDNS=no'
                >
              )
            }
          spids: [35]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SSHCMD)
          op: assign_op.Equal
          rhs: {(DQ <'ssh '> ($ Id.VSub_DollarName '$SSHCOMMON'))}
          spids: [40]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:SCPCMD)
          op: assign_op.Equal
          rhs: {(DQ <'scp '> ($ Id.VSub_DollarName '$SSHCOMMON'))}
          spids: [46]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:BOOT)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                child: 
                  (command.Pipeline
                    children: [(C {<'./cluster-whatsup.sh'>} {<bcpc-bootstrap>}) (C {<grep>} {<10>})]
                    negated: F
                  )
              )
            }
          spids: [53]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.DBracket
                      expr: 
                        (bool_expr.Binary
                          op_id: Id.BoolBinary_GlobEqual
                          left: {(${ Id.VSub_Name BOOT)}
                          right: {(DQ <10.0.100.3>)}
                        )
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          action: [
            (C {<echo>} {(DQ <'Bootstrap node is up...'>)})
            (command.If
              arms: [
                (if_arm
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.DBracket
                              expr: 
                                (bool_expr.LogicalNot
                                  child: (bool_expr.Unary op_id:Id.BoolUnary_d child:{<'../output'>})
                                )
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  action: [(C {<mkdir>} {<'../output'>})]
                  spids: [95 108]
                )
              ]
              else_action: [
                (C {<echo>} {(DQ <'Output directory ../output exists.'>)})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.LogicalOr
                                      left: 
                                        (bool_expr.Unary
                                          op_id: Id.BoolUnary_f
                                          child: {<'../output/bins.tar.gz'>}
                                        )
                                      right: 
                                        (bool_expr.Unary
                                          op_id: Id.BoolUnary_f
                                          child: {<'../output/cookbooks.tar.gz'>}
                                        )
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (command.DBracket
                                          expr: 
                                            (bool_expr.Unary
                                              op_id: Id.BoolUnary_z
                                              child: {(DQ ($ Id.VSub_DollarName '$OVERW'))}
                                            )
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<echo>} {(DQ <'output files already exist, not overwiting...'>)})
                                (command.ControlFlow
                                  token: <Id.ControlFlow_Exit exit>
                                  arg_word: {<1>}
                                )
                              ]
                              spids: [146 159]
                            )
                          ]
                          else_action: [(C {<echo>} {(DQ <'overwriting specified, continuing.'>)})]
                        )
                      ]
                      spids: [126 143]
                    )
                  ]
                )
              ]
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BNDO)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ <'sshpass -p ubuntu '> ($ Id.VSub_DollarName '$SSHCMD') 
                        <' -t ubuntu@10.0.100.3'>
                      )
                    }
                  spids: [193]
                )
              ]
            )
            (C {<echo>} {(DQ <'Collecting non-BCPC cookbooks...'>)})
            (C {($ Id.VSub_DollarName '$BNDO')} 
              {
                (DQ 
                  <
'cd chef-bcpc && tar --exclude=bcpc --exclude=bcpc-centos --exclude=chef-client.patch --exclude='
                  > (${ Id.VSub_Name PWD) <'/README.md -cf ../cookbooks.tar cookbooks'>
                )
              }
            )
            (C {<echo>} {(DQ <'Collecting built binaries...'>)})
            (C {($ Id.VSub_DollarName '$BNDO')} 
              {
                (DQ 
                  <
'cd chef-bcpc/cookbooks/bcpc/files/default && tar -cf ../../../../../bins.tar bins'
                  >
                )
              }
            )
            (C {<echo>} {(DQ <'Compressing files...'>)})
            (C {($ Id.VSub_DollarName '$BNDO')} {(DQ <'gzip cookbooks.tar bins.tar'>)})
            (C {<sshpass>} {<-p>} {<ubuntu>} {($ Id.VSub_DollarName '$SCPCMD')} 
              {<ubuntu> <Id.Lit_At '@'> <10.0.100.3> <Id.Lit_Colon ':'> <'/home/ubuntu/bins.tar.gz'>} {<'../output'>}
            )
            (C {<sshpass>} {<-p>} {<ubuntu>} {($ Id.VSub_DollarName '$SCPCMD')} 
              {<ubuntu> <Id.Lit_At '@'> <10.0.100.3> <Id.Lit_Colon ':'> 
                <'/home/ubuntu/cookbooks.tar.gz'>
              } {<'../output'>}
            )
            (C {<echo>} {(DQ <'Removing files from bootstrap node...'>)})
            (C {($ Id.VSub_DollarName '$BNDO')} {(DQ <'rm cookbooks.tar.gz bins.tar.gz'>)})
            (C {<echo>} {(DQ <'Finished :'>)})
            (C {<ls>} {<-l>} {<'../output'>})
          ]
          spids: [68 85]
        )
      ]
      else_action: [(C {<echo>} {(DQ <Fail.>)})]
    )
  ]
)