(command.CommandList
  children: [
    (C {(Id.KW_Set set)} {(-e)})
    (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: (Token id:Id.Op_Semi val:';' span_id:28)
            )
          ]
          action: [(C {(.)} {(./proxy_setup.sh)})]
          spids: [19 30]
        )
      ]
    )
    (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: [40]
        )
      ]
    )
    (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: (Token id:Id.Op_Semi val:';' span_id:54)
            )
          ]
          action: [(C {(.)} {($ Id.VSub_DollarName '$PROXY_INFO_FILE')})]
          spids: [45 56]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_z
                      child: {($ Id.VSub_DollarName '$http_proxy')}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:78)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:GEM_PROXY)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [83]
                )
              ]
            )
          ]
          spids: [69 80]
        )
      ]
      else_action: [
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:GEM_PROXY)
              op: assign_op.Equal
              rhs: {(DQ ('-p ') ($ Id.VSub_DollarName '$http_proxy'))}
              spids: [90]
            )
          ]
        )
      ]
    )
    (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: (Token id:Id.Op_Semi val:';' span_id:110)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:BOOTSTRAP_IP)
                  op: assign_op.Equal
                  rhs: {(10.0.100.3)}
                  spids: [115]
                )
              ]
            )
          ]
          spids: [99 112]
        )
      ]
      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: [121]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.Unary
                      op_id: Id.BoolUnary_z
                      child: {(DQ ($ Id.VSub_DollarName '$CURL'))}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:141)
            )
          ]
          action: [
            (C {(echo)} {(DQ ('CURL is not defined'))})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:153)
            )
          ]
          spids: [130 143]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.Pipeline
                  children: [
                    (command.Simple
                      words: [{(dpkg)} {(-s)} {(chef-server-core)}]
                      redirects: [
                        (redir.Redir
                          op: (Token id:Id.Redir_Great val:'2>' span_id:166)
                          fd: 2
                          arg_word: {(/dev/null)}
                        )
                      ]
                    )
                    (C {(grep)} {(-q)} {(Status.) (Id.Lit_Star '*') (installed)})
                  ]
                  negated: F
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:178)
            )
          ]
          action: [(C {(echo)} {(chef)} {(server)} {(is)} {(installed)})]
          spids: [158 180]
        )
      ]
      else_action: [
        (C {(dpkg)} {(-i)} {(cookbooks/bcpc/files/default/bins/chef-server.deb)})
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-s)} {(/etc/opscode/chef-server.rb)} 
                      {(Id.Lit_RBracket ']')}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:214)
                )
              ]
              action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} {(/etc/opscode)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:230)
                        )
                      ]
                      action: [(C {(mkdir)} {(/etc/opscode)}) (C {(chown)} {(775)} {(/etc/opscode)})]
                      spids: [219 232]
                    )
                  ]
                )
                (command.Simple
                  words: [{(cat)}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:252)
                      fd: -1
                      arg_word: {(/etc/opscode/chef-server.rb)}
                    )
                    (redir.HereDoc
                      op: (Token id:Id.Redir_DLess val:'<<' span_id:256)
                      fd: -1
                      here_begin: {(EOF)}
                      here_end_span_id: 273
                      stdin_parts: [
                        ('# api_fqdn ')
                        (Id.Right_DoubleQuote '"')
                        (${ Id.VSub_Name BOOTSTRAP_IP)
                        (Id.Right_DoubleQuote '"')
                        ('\n')
                        ('# allow connecting to http port directly\n')
                        ("# nginx['enable_non_ssl'] = true\n")
                        ('# have nginx listen on port 4000\n')
                        ("nginx['non_ssl_port'] = 4000\n")
                        ('# allow long-running recipes not to die with an error due to auth\n')
                        ("#opscode_erchef['s3_url_ttl'] = 3600\n")
                      ]
                    )
                  ]
                )
              ]
              spids: [203 216]
            )
          ]
        )
        (C {(chef-server-ctl)} {(reconfigure)})
        (C {(chef-server-ctl)} {(user-create)} {(admin)} {(admin)} {(admin)} 
          {(admin) (Id.Lit_Splice '@localhost') (.com)} {(welcome)} {(--filename)} {(/etc/opscode/admin.pem)}
        )
        (C {(chef-server-ctl)} {(org-create)} {(bcpc)} {(DQ (BCPC))} {(--association)} {(admin)} 
          {(--filename)} {(/etc/opscode/bcpc-validator.pem)}
        )
        (C {(chmod)} {(0600)} 
          (word.BracedTree
            parts: [(/etc/opscode/) (word_part.BracedTuple words:[{(bcpc-validator)} {(admin)}]) (.pem)]
          )
        )
      ]
    )
    (C {(dpkg)} {(-E)} {(-i)} {(cookbooks/bcpc/files/default/bins/chef-client.deb)})
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (command.DBracket
                  expr: 
                    (bool_expr.LogicalAnd
                      left: 
                        (bool_expr.Unary
                          op_id: Id.BoolUnary_f
                          child: {($ Id.VSub_DollarName '$HOME') (/.ssh/authorized_keys)}
                        )
                      right: 
                        (bool_expr.LogicalNot
                          child: 
                            (bool_expr.Unary
                              op_id: Id.BoolUnary_f
                              child: {(/root/.ssh/authorized_keys)}
                            )
                        )
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:368)
            )
          ]
          action: [
            (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:{(/root/.ssh)})
                            )
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:384)
                    )
                  ]
                  action: [(C {(mkdir)} {(/root/.ssh)})]
                  spids: [373 386]
                )
              ]
            )
            (C {(cp)} {($ Id.VSub_DollarName '$HOME') (/.ssh/authorized_keys)} 
              {(/root/.ssh/authorized_keys)}
            )
          ]
          spids: [350 370]
        )
      ]
    )
    (C {(echo)} {(DQ ('HTTP proxy: ') ($ Id.VSub_DollarName '$http_proxy'))})
    (C {(echo)} {(DQ ('HTTPS proxy: ') ($ Id.VSub_DollarName '$https_proxy'))})
    (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 '$https_proxy'))}
                    )
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:437)
            )
          ]
          action: [
            (C {(./proxy_cert_download_hack.sh)} {(rubygems.org)})
            (C {(./proxy_cert_download_hack.sh)} {(supermarket.chef.io)})
          ]
          spids: [425 439]
        )
      ]
    )
    (command.Simple
      words: [{(read)} {(shebang)}]
      redirects: [
        (redir.Redir
          op: (Token id:Id.Redir_Less val:'<' span_id:461)
          fd: -1
          arg_word: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:463)
                command_list: (command.CommandList children:[(C {(type)} {(-P)} {(knife)})])
              )
            }
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ruby_interp)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Name val:shebang span_id:474)
                  suffix_op: (suffix_op.Slice begin:(arith_expr.ArithWord w:{(Id.Lit_Digits 2)}))
                )
              )
            }
          spids: [471]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:bindir)
          op: assign_op.Equal
          rhs: 
            {
              (DQ 
                (braced_var_sub
                  token: (Token id:Id.VSub_Name val:ruby_interp span_id:483)
                  suffix_op: (suffix_op.Unary op_id:Id.VOp1_Percent arg_word:{(Id.Lit_Slash /) ('*')})
                )
              )
            }
          spids: [480]
        )
      ]
    )
    (C {($ Id.VSub_DollarName '$bindir') (/gem)} {(install)} {($ Id.VSub_DollarName '$GEM_PROXY')} 
      {(knife-acl)}
    )
  ]
)