(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: <Id.Op_Semi _>
            )
          ]
          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: <Id.Op_Semi _>
            )
          ]
          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: <Id.Op_Semi _>
            )
          ]
          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: <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: [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: <Id.Op_Semi _>
            )
          ]
          action: [
            (C {<echo>} {(DQ <'CURL is not defined'>)})
            (command.ControlFlow token:<Id.ControlFlow_Exit exit>)
          ]
          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:<Id.Redir_Great '2>'> fd:2 arg_word:{</dev/null>})]
                    )
                    (C {<grep>} {<-q>} {<Status.> <Id.Lit_Star '*'> <installed>})
                  ]
                  negated: F
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          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: <Id.Op_Semi _>
                )
              ]
              action: [
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {</etc/opscode>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                      action: [(C {<mkdir>} {</etc/opscode>}) (C {<chown>} {<775>} {</etc/opscode>})]
                      spids: [219 232]
                    )
                  ]
                )
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Great '>'>
                      fd: -1
                      arg_word: {</etc/opscode/chef-server.rb>}
                    )
                    (redir.HereDoc
                      op: <Id.Redir_DLess '<<'>
                      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: <Id.Op_Semi _>
            )
          ]
          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: <Id.Op_Semi _>
                    )
                  ]
                  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: <Id.Op_Semi _>
            )
          ]
          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: <Id.Redir_Less '<'>
          fd: -1
          arg_word: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                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: <Id.VSub_Name shebang>
                  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: <Id.VSub_Name ruby_interp>
                  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>}
    )
  ]
)