(command.CommandList
  children: [
    (command.ShFunction
      name: gen_knife_config
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<cat>}]
              redirects: [
                (redir.HereDoc
                  op: <Id.Redir_DLess '<<'>
                  fd: -1
                  here_begin: {<EOF>}
                  here_end_span_id: 62
                  stdin_parts: [
                    <'current_dir = File.dirname(__FILE__)\n'>
                    <'log_level                :info\n'>
                    <'log_location             STDOUT\n'>
                    <'node_name                '>
                    <Id.Right_DoubleQuote '"'>
                    <admin>
                    <Id.Right_DoubleQuote '"'>
                    <'\n'>
                    <'client_key               '>
                    <Id.Right_DoubleQuote '"'>
                    <'#{current_dir}/admin.pem'>
                    <Id.Right_DoubleQuote '"'>
                    <'\n'>
                    <'validation_client_name   '>
                    <Id.Right_DoubleQuote '"'>
                    <bcpc-validator>
                    <Id.Right_DoubleQuote '"'>
                    <'\n'>
                    <'validation_key           '>
                    <Id.Right_DoubleQuote '"'>
                    <'#{current_dir}/bcpc-validator.pem'>
                    <Id.Right_DoubleQuote '"'>
                    <'\n'>
                    <'chef_server_url          '>
                    <Id.Right_DoubleQuote '"'>
                    <'https://bcpc-bootstrap/organizations/bcpc'>
                    <Id.Right_DoubleQuote '"'>
                    <'\n'>
                    <"cache_type               'BasicFile'\n">
                    <'cache_options( :path => '>
                    <Id.Right_DoubleQuote '"'>
                    <"#{ENV['HOME']}/.chef/checksums">
                    <Id.Right_DoubleQuote '"'>
                    <' )\n'>
                    <'cookbook_path            ['>
                    <Id.Right_DoubleQuote '"'>
                    <'#{current_dir}/../cookbooks'>
                    <Id.Right_DoubleQuote '"'>
                    <']\n'>
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: copy_client_keys
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_n
                              child: {(DQ ($ Id.VSub_DollarName '$SUDO_USER'))}
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:OWNER)
                          op: assign_op.Equal
                          rhs: {($ Id.VSub_DollarName '$SUDO_USER')}
                          spids: [88]
                        )
                      ]
                    )
                  ]
                  spids: [72 85]
                )
              ]
              else_action: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:OWNER)
                      op: assign_op.Equal
                      rhs: {($ Id.VSub_DollarName '$USER')}
                      spids: [95]
                    )
                  ]
                )
              ]
            )
            (C {<install>} {<-d>} {<-m0770>} {<-o>} {($ Id.VSub_DollarName '$OWNER')} {<.chef>})
            (C {<sudo>} {<install>} {<-m0600>} {<-o>} {($ Id.VSub_DollarName '$OWNER')} 
              {</etc/opscode/admin.pem>} {<.chef/admin.pem>}
            )
            (C {<sudo>} {<install>} {<-m0600>} {<-o>} {($ Id.VSub_DollarName '$OWNER')} 
              {</etc/opscode/bcpc-validator.pem>} {<.chef/bcpc-validator.pem>}
            )
          ]
        )
    )
    (C {<Id.KW_Set set>} {<-x>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PROXY_INFO_FILE)
          op: assign_op.Equal
          rhs: {(DQ </home/vagrant/proxy_info.sh>)}
          spids: [156]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_f
                      child: {($ Id.VSub_DollarName '$PROXY_INFO_FILE')}
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<.>} {($ Id.VSub_DollarName '$PROXY_INFO_FILE')})]
          spids: [161 172]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<./proxy_setup.sh>})
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<.>} {<./proxy_setup.sh>})]
          spids: [182 193]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_Number '$1'))})
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BOOTSTRAP_IP)
                  op: assign_op.Equal
                  rhs: {<10.0.100.3>}
                  spids: [219]
                )
              ]
            )
          ]
          spids: [203 216]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:BOOTSTRAP_IP)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Number '$1')}
              spids: [225]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_z child:{(DQ ($ Id.VSub_Number '$2'))})
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:USER)
                  op: assign_op.Equal
                  rhs: {<root>}
                  spids: [247]
                )
              ]
            )
          ]
          spids: [231 244]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:USER)
              op: assign_op.Equal
              rhs: {($ Id.VSub_Number '$2')}
              spids: [253]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: (bool_expr.Unary op_id:Id.BoolUnary_f child:{<.chef/knife.rb>})
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<knife>} {<node>} {<delete>} 
                  {
                    (command_sub
                      left_token: <Id.Left_Backtick '`'>
                      command_list: (command.CommandList children:[(C {<hostname>} {<-f>})])
                    )
                  } {<-y>}
                )
                (C {<true>})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<knife>} {<client>} {<delete>} {($ Id.VSub_DollarName '$USER')} {<-y>})
                (C {<true>})
              ]
            )
            (C {<mv>} {<.chef/>} 
              {
                (DQ <.chef_found_> 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [(C {<date>} {<Id.Lit_Other '+'> (DQ <'%m-%d-%Y %H:%M:%S'>)})]
                      )
                  )
                )
              }
            )
          ]
          spids: [262 273]
        )
      ]
    )
    (C {<install>} {<-d>} {<-m0700>} {<.chef>})
    (command.Simple
      words: [{<gen_knife_config>}]
      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<.chef/knife.rb>})]
    )
    (C {<cp>} {<-p>} {<.chef/knife.rb>} {<.chef/knife-proxy.rb>})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalNot
                      child: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_z
                          child: {(DQ ($ Id.VSub_DollarName '$http_proxy'))}
                        )
                    )
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'http_proxy  '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                    (${ Id.VSub_Name http_proxy) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_DGreat '>>'>
                  fd: -1
                  arg_word: {<.chef/knife-proxy.rb>}
                )
              ]
            )
            (command.Simple
              words: [
                {<echo>}
                {
                  (DQ <'https_proxy '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) 
                    (${ Id.VSub_Name https_proxy) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_DGreat '>>'>
                  fd: -1
                  arg_word: {<.chef/knife-proxy.rb>}
                )
              ]
            )
          ]
          spids: [354 369]
        )
      ]
    )
    (C {<copy_client_keys>})
    (C {<knife>} {<ssl>} {<fetch>})
    (C {<cd>} {<cookbooks>})
    (command.ForEach
      iter_name: cookbook
      iter_words: [
        {(DQ <'apt 1.10.0'>)}
        {<ubuntu>}
        {<cron>}
        {<ntp>}
        {(DQ <'yum 3.2.2'>)}
        {(DQ <'logrotate 1.6.0'>)}
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (command.DBracket
                          expr: 
                            (bool_expr.LogicalNot
                              child: 
                                (bool_expr.Unary
                                  op_id: Id.BoolUnary_d
                                  child: 
                                    {
                                      (braced_var_sub
                                        token: <Id.VSub_Name cookbook>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Percent
                                            arg_word: {<' *'>}
                                          )
                                      )
                                    }
                                )
                            )
                        )
                      terminator: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (C {<knife>} {<cookbook>} {<site>} {<download>} {($ Id.VSub_DollarName '$cookbook')} 
                      {<--config>} {<../.chef/knife-proxy.rb>}
                    )
                    (C {<tar>} {<zxf>} 
                      {
                        (braced_var_sub
                          token: <Id.VSub_Name cookbook>
                          suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<' *'>})
                        ) <Id.Lit_Star '*'> <.tar.gz>
                      }
                    )
                    (C {<rm>} 
                      {
                        (braced_var_sub
                          token: <Id.VSub_Name cookbook>
                          suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<' *'>})
                        ) <Id.Lit_Star '*'> <.tar.gz>
                      }
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (command.DBracket
                                  expr: 
                                    (bool_expr.Unary
                                      op_id: Id.BoolUnary_f
                                      child: 
                                        {
                                          (braced_var_sub
                                            token: <Id.VSub_Name cookbook>
                                            suffix_op: 
                                              (suffix_op.Unary
                                                op_id: Id.VOp1_Percent
                                                arg_word: {<' *'>}
                                              )
                                          ) <.patch>
                                        }
                                    )
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                          action: [
                            (C {<pushd>} 
                              {
                                (braced_var_sub
                                  token: <Id.VSub_Name cookbook>
                                  suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{<' *'>})
                                )
                              }
                            )
                            (command.Simple
                              words: [{<patch>} {<-p1>}]
                              redirects: [
                                (redir.Redir
                                  op: <Id.Redir_Less '<'>
                                  fd: -1
                                  arg_word: 
                                    {<../> 
                                      (braced_var_sub
                                        token: <Id.VSub_Name cookbook>
                                        suffix_op: 
                                          (suffix_op.Unary
                                            op_id: Id.VOp1_Percent
                                            arg_word: {<' *'>}
                                          )
                                      ) <.patch>
                                    }
                                )
                              ]
                            )
                            (C {<popd>})
                          ]
                          spids: [517 533]
                        )
                      ]
                    )
                  ]
                  spids: [454 471]
                )
              ]
            )
          ]
        )
    )
  ]
)