(command.CommandList
  children: [
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:PERL) op:Equal rhs:{(SQ <'@@PERL@@'>)})]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTIONS_KEEPDASHDASH) op:Equal rhs:(word.Empty))]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OPTIONS_STUCKLONG) op:Equal rhs:(word.Empty))]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:OPTIONS_SPEC)
          op: Equal
          rhs: 
            {
              (DQ ('git instaweb [options] (--start | --stop | --restart)\n') ('--\n') 
                ('l,local        only bind on 127.0.0.1\n') ('p,port=        the port to bind to\n') ('d,httpd=       the command to launch\n') 
                ('b,browser=     the browser to launch\n') ('m,module-path= the module path (only needed for apache2)\n') (' Action\n') 
                ('stop           stop the web server\n') ('start          start the web server\n') ('restart        restart the web server\n')
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:SUBDIRECTORY_OK) op:Equal rhs:{(Yes)})]
    )
    (C {(.)} {(git-sh-setup)})
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:fqgitdir)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR'))}
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:local)
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(git)} {(config)} {(--bool)} {(--get)} {(instaweb.local)})]
                    )
                )
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:httpd)
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(git)} {(config)} {(--get)} {(instaweb.httpd)})]
                    )
                )
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:root)
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(git)} {(config)} {(--get)} {(instaweb.gitwebdir)})]
                    )
                )
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:port)
          op: Equal
          rhs: 
            {
              (word_part.CommandSub
                left_token: <Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [(C {(git)} {(config)} {(--get)} {(instaweb.port)})]
                  )
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:module_path)
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(git)} {(config)} {(--get)} {(instaweb.modulepath)})]
                    )
                )
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:action) op:Equal rhs:{(DQ (browse))})]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:conf)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$GIT_DIR') (/gitweb/httpd.conf))}
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$httpd'))})
        (command.Assignment
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:httpd) op:Equal rhs:{(SQ <'lighttpd -f'>)})]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$root'))})
        (command.Assignment
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:root) op:Equal rhs:{(SQ <'@@GITWEBDIR@@'>)})]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DAmp]
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$port'))})
        (command.Assignment
          pairs: [(assign_pair lhs:(lhs_expr.LhsName name:port) op:Equal rhs:{(1234)})]
        )
      ]
    )
    (command.FuncDef
      name: resolve_full_httpd
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$httpd'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(Lit_Star '*') (apache2) (Lit_Star '*')}
                    {(Lit_Star '*') (lighttpd) (Lit_Star '*')}
                    {(Lit_Star '*') (httpd) (Lit_Star '*')}
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Pipeline
                              children: [
                                (C {(echo)} {(DQ ($ VSub_DollarName '$httpd'))})
                                (command.Simple
                                  words: [{(sane_grep)} {(--)} {(SQ <'-f *$'>)}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Redir_Great '>'>
                                      fd: 16777215
                                      arg_word: {(/dev/null)}
                                    )
                                    (redir.Redir
                                      op: <Redir_GreatAnd '2>&'>
                                      fd: 2
                                      arg_word: {(1)}
                                    )
                                  ]
                                )
                              ]
                              negated: T
                            )
                          ]
                          action: [
                            (command.Assignment
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:httpd)
                                  op: Equal
                                  rhs: {(DQ ($ VSub_DollarName '$httpd') (' -f'))}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*') (plackup) (Lit_Star '*')}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:full_httpd)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/gitweb.psgi))}
                        )
                      ]
                    )
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:httpd_only)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (word_part.BracedVarSub
                                  token: <VSub_Name httpd>
                                  suffix_op: (suffix_op.Unary op_id:VOp1_DPercent arg_word:{(' *')})
                                )
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*') (webrick) (Lit_Star '*')}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:full_httpd)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/webrick.rb))}
                        )
                      ]
                    )
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:httpd_only)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (word_part.BracedVarSub
                                  token: <VSub_Name httpd>
                                  suffix_op: (suffix_op.Unary op_id:VOp1_DPercent arg_word:{(' *')})
                                )
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow token:<ControlFlow_Return return>)
                  ]
                )
              ]
            )
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:httpd_only)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (command.Pipeline
                                  children: [
                                    (C {(echo)} {($ VSub_DollarName '$httpd')})
                                    (C {(cut)} {(-f1)} {(-d) (SQ <' '>)})
                                  ]
                                  negated: F
                                )
                              ]
                            )
                        )
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Case
                      to_match: {(DQ ($ VSub_DollarName '$httpd_only'))}
                      arms: [
                        (case_arm
                          pat_list: [{(/) (Lit_Star '*')}]
                          action: [(C {(Lit_Other ':')})]
                        )
                        (case_arm
                          pat_list: [{(Lit_Star '*')}]
                          action: [
                            (command.Simple
                              words: [{(which)} {($ VSub_DollarName '$httpd_only')}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_Great '>'>
                                  fd: 16777215
                                  arg_word: {(/dev/null)}
                                )
                                (redir.Redir
                                  op: <Redir_GreatAnd '2>&'>
                                  fd: 2
                                  arg_word: {(1)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:full_httpd)
                          op: Equal
                          rhs: {($ VSub_DollarName '$httpd')}
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.ForEach
                  iter_name: i
                  iter_words: [
                    {(/usr/local/sbin)}
                    {(/usr/sbin)}
                    {(DQ ($ VSub_DollarName '$root'))}
                    {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb))}
                  ]
                  do_arg_iter: F
                  body: 
                    (command.DoGroup
                      children: [
                        (command.If
                          arms: [
                            (if_arm
                              cond: [
                                (C {(test)} {(-x)} 
                                  {
                                    (DQ ($ VSub_DollarName '$i') (/) ($ VSub_DollarName '$httpd_only'))
                                  }
                                )
                              ]
                              action: [
                                (command.Assignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (lhs_expr.LhsName name:full_httpd)
                                      op: Equal
                                      rhs: {($ VSub_DollarName '$i') (/) ($ VSub_DollarName '$httpd')}
                                    )
                                  ]
                                )
                                (command.ControlFlow
                                  token: <ControlFlow_Return return>
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                )
                (command.Simple
                  words: [
                    {(echo)}
                    {
                      (DQ ($ VSub_DollarName '$httpd_only') (' not found. Install ') 
                        ($ VSub_DollarName '$httpd_only') (' or use')
                      )
                    }
                    {(DQ ('--httpd to specify another httpd daemon.'))}
                  ]
                  redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                )
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: start_httpd
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$fqgitdir') (/pid))})
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (C {(say)} {(DQ ('Instance already running. Restarting...'))})
                    (C {(stop_httpd)})
                  ]
                )
              ]
            )
            (C {(resolve_full_httpd)})
            (C {(mkdir)} {(-p)} 
              {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd_only'))}
            )
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:conf)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd_only') 
                        (.conf)
                      )
                    }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [(C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$conf'))}) (C {(configure_httpd)})]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/gitweb_config.perl))})
                (C {(gitweb_conf)})
              ]
            )
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$httpd'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(Lit_Star '*') (mongoose) (Lit_Star '*')}
                    {(Lit_Star '*') (plackup) (Lit_Star '*')}
                  ]
                  action: [
                    (command.Sentence
                      child: (C {($ VSub_DollarName '$full_httpd')} {(DQ ($ VSub_DollarName '$conf'))})
                      terminator: <Op_Amp '&'>
                    )
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:pid)
                          op: Equal
                          rhs: {($ VSub_Bang '$!')}
                        )
                      ]
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(test)} {($ VSub_QMark '$?')} {(KW_Bang '!') (Lit_Other '=')} {(0)})
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('Could not execute http daemon ') ($ VSub_DollarName '$httpd') (.))
                              }
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.Simple
                      words: [{(cat)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_DollarName '$fqgitdir') (/pid))}
                        )
                        (redir.HereDoc
                          op: <Redir_DLess '<<'>
                          fd: 16777215
                          here_begin: {(EOF)}
                          here_end_span_id: 707
                          stdin_parts: [($ VSub_DollarName '$pid') ('\n')]
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [
                    (C {($ VSub_DollarName '$full_httpd')} {(DQ ($ VSub_DollarName '$conf'))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (command.Sentence
                              child: 
                                (C {(test)} {($ VSub_QMark '$?')} {(KW_Bang '!') (Lit_Other '=')} {(0)})
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('Could not execute http daemon ') ($ VSub_DollarName '$httpd') (.))
                              }
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: stop_httpd
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$fqgitdir') (/pid))})
                (C {(kill)} 
                  {
                    (word_part.CommandSub
                      left_token: <Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {(cat)} {(DQ ($ VSub_DollarName '$fqgitdir') (/pid))})]
                        )
                    )
                  }
                )
              ]
            )
            (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$fqgitdir') (/pid))})
          ]
        )
    )
    (command.FuncDef
      name: httpd_is_ready
      body: 
        (command.BraceGroup
          children: [
            (C {(DQ ($ VSub_DollarName '$PERL'))} 
              {(-MIO) (Lit_Other ':') (Lit_Other ':') (Socket) (Lit_Other ':') (Lit_Other ':') (INET)} {(-e)} 
              {
                (DQ ('\n') ('local ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) 
                  ('| = 1; # turn on autoflush\n') ("exit if (IO::Socket::INET->new('127.0.0.1:") ($ VSub_DollarName '$port') ("'));\n") 
                  ("print 'Waiting for ") (Lit_Other '\\') ("'") ($ VSub_DollarName '$httpd') (Lit_Other '\\') ("' to start ..';\n") ('do {\n') 
                  ("\tprint '.';\n") ('\tsleep(1);\n') ("} until (IO::Socket::INET->new('127.0.0.1:") ($ VSub_DollarName '$port') ("'));\n") 
                  ('print qq! (done)') (Lit_Other '\\') ('n!;\n')
                )
              }
            )
          ]
        )
    )
    (command.WhileUntil
      keyword: <KW_While while>
      cond: [(C {(test)} {($ VSub_Pound '$#')} {(KW_Bang '!') (Lit_Other '=')} {(0)})]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(--stop)} {(stop)}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:action)
                          op: Equal
                          rhs: {(DQ (stop))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--start)} {(start)}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:action)
                          op: Equal
                          rhs: {(DQ (start))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(--restart)} {(restart)}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:action)
                          op: Equal
                          rhs: {(DQ (restart))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-l)} {(--local)}]
                  action: [
                    (command.Assignment
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:local) op:Equal rhs:{(true)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-d)} {(--httpd)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:httpd)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-b)} {(--browser)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:browser)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-p)} {(--port)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:port)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(-m)} {(--module-path)}]
                  action: [
                    (C {(shift)})
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:module_path)
                          op: Equal
                          rhs: {(DQ ($ VSub_Number '$1'))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm pat_list:[{(--)}])
                (case_arm pat_list:[{(Lit_Star '*')}] action:[(C {(usage)})])
              ]
            )
            (C {(shift)})
          ]
        )
    )
    (C {(mkdir)} {(-p)} {(DQ ($ VSub_DollarName '$GIT_DIR') (/gitweb/tmp))})
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:GIT_EXEC_PATH)
          op: Equal
          rhs: 
            {
              (DQ 
                (word_part.CommandSub
                  left_token: <Left_DollarParen '$('>
                  command_list: (command.CommandList children:[(C {(git)} {(--exec-path)})])
                )
              )
            }
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:GIT_DIR)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$fqgitdir'))}
        )
      ]
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:GITWEB_CONFIG)
          op: Equal
          rhs: {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/gitweb_config.perl))}
        )
      ]
    )
    (C {(export)} {(GIT_EXEC_PATH)} {(GIT_DIR)} {(GITWEB_CONFIG)})
    (command.FuncDef
      name: webrick_conf
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:wrapper)
                  op: Equal
                  rhs: 
                    {
                      (DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd') 
                        (/wrapper.sh)
                      )
                    }
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$wrapper'))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 1128
                  stdin_parts: [
                    ('#!@SHELL_PATH@\n')
                    ('# we use this shell script wrapper around the real gitweb.cgi since\n')
                    ('# there appears to be no other way to pass arbitrary environment variables\n')
                    ('# into the CGI process\n')
                    ('GIT_EXEC_PATH=')
                    ($ VSub_DollarName '$GIT_EXEC_PATH')
                    (' GIT_DIR=')
                    ($ VSub_DollarName '$GIT_DIR')
                    (' GITWEB_CONFIG=')
                    ($ VSub_DollarName '$GITWEB_CONFIG')
                    ('\n')
                    ('export GIT_EXEC_PATH GIT_DIR GITWEB_CONFIG\n')
                    ('exec ')
                    ($ VSub_DollarName '$root')
                    ('/gitweb.cgi\n')
                  ]
                )
              ]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} {(DQ ($ VSub_DollarName '$wrapper'))})
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: 
                    {
                      (DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd') (.rb))
                    }
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 1226
                  stdin_parts: [
                    ('#!/usr/bin/env ruby\n')
                    ("require 'webrick'\n")
                    ("require 'logger'\n")
                    ('options = {\n')
                    ('  :Port => ')
                    ($ VSub_DollarName '$port')
                    (',\n')
                    ('  :DocumentRoot => ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$root')
                    (Right_DoubleQuote '"')
                    (',\n')
                    ("  :Logger => Logger.new('")
                    ($ VSub_DollarName '$fqgitdir')
                    ("/gitweb/error.log'),\n")
                    ('  :AccessLog => [\n')
                    ("    [ Logger.new('")
                    ($ VSub_DollarName '$fqgitdir')
                    ("/gitweb/access.log'),\n")
                    ('      WEBrick::AccessLog::COMBINED_LOG_FORMAT ]\n')
                    ('  ],\n')
                    ('  :DirectoryIndex => [')
                    (Right_DoubleQuote '"')
                    (gitweb.cgi)
                    (Right_DoubleQuote '"')
                    ('],\n')
                    ('  :CGIInterpreter => ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$wrapper')
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  :StartCallback => lambda do\n')
                    ('    File.open(')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/pid)
                    (Right_DoubleQuote '"')
                    (', ')
                    (Right_DoubleQuote '"')
                    (w)
                    (Right_DoubleQuote '"')
                    (') { |f| f.puts Process.pid }\n')
                    ('  end,\n')
                    ('  :ServerType => WEBrick::Daemon,\n')
                    ('}\n')
                    ("options[:BindAddress] = '127.0.0.1' if ")
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$local')
                    (Right_DoubleQuote '"')
                    (' == ')
                    (Right_DoubleQuote '"')
                    (true)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('server = WEBrick::HTTPServer.new(options)\n')
                    ("['INT', 'TERM'].each do |signal|\n")
                    ('  trap(signal) {server.shutdown}\n')
                    ('end\n')
                    ('server.start\n')
                  ]
                )
              ]
            )
            (C {(chmod)} {(Lit_Other '+') (x)} 
              {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd') (.rb))}
            )
            (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$conf'))})
          ]
        )
    )
    (command.FuncDef
      name: lighttpd_conf
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 1821
                  stdin_parts: [
                    ('server.document-root = ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$root')
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('server.port = ')
                    ($ VSub_DollarName '$port')
                    ('\n')
                    ('server.modules = ( ')
                    (Right_DoubleQuote '"')
                    (mod_setenv)
                    (Right_DoubleQuote '"')
                    (', ')
                    (Right_DoubleQuote '"')
                    (mod_cgi)
                    (Right_DoubleQuote '"')
                    (' )\n')
                    ('server.indexfiles = ( ')
                    (Right_DoubleQuote '"')
                    (gitweb.cgi)
                    (Right_DoubleQuote '"')
                    (' )\n')
                    ('server.pid-file = ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/pid)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('server.errorlog = ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    (/error.log)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('\n')
                    ('# to enable, add ')
                    (Right_DoubleQuote '"')
                    (mod_access)
                    (Right_DoubleQuote '"')
                    (', ')
                    (Right_DoubleQuote '"')
                    (mod_accesslog)
                    (Right_DoubleQuote '"')
                    (' to server.modules\n')
                    ('# variable above and uncomment this\n')
                    ('#accesslog.filename = ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    (/access.log)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('\n')
                    ('setenv.add-environment = ( ')
                    (Right_DoubleQuote '"')
                    (PATH)
                    (Right_DoubleQuote '"')
                    (' => env.PATH, ')
                    (Right_DoubleQuote '"')
                    (GITWEB_CONFIG)
                    (Right_DoubleQuote '"')
                    (' => env.GITWEB_CONFIG )\n')
                    ('\n')
                    ('cgi.assign = ( ')
                    (Right_DoubleQuote '"')
                    (.cgi)
                    (Right_DoubleQuote '"')
                    (' => ')
                    (Right_DoubleQuote '"')
                    (Right_DoubleQuote '"')
                    (' )\n')
                    ('\n')
                    ('# mimetype mapping\n')
                    ('mimetype.assign             = (\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.pdf)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/pdf)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.sig)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/pgp-signature)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.spl)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/futuresplash)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.class)
                    (Right_DoubleQuote '"')
                    ('        =>      ')
                    (Right_DoubleQuote '"')
                    (application/octet-stream)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.ps)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (application/postscript)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.torrent)
                    (Right_DoubleQuote '"')
                    ('      =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bittorrent)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.dvi)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-dvi)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.gz)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-gzip)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.pac)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-ns-proxy-autoconfig)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.swf)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-shockwave-flash)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.tar.gz)
                    (Right_DoubleQuote '"')
                    ('       =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-tgz)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.tgz)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-tgz)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.tar)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-tar)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.zip)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/zip)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.mp3)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/mpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.m3u)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-mpegurl)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.wma)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-ms-wma)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.wax)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-ms-wax)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.ogg)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/ogg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.wav)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-wav)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.gif)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/gif)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.jpg)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/jpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.jpeg)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (image/jpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.png)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/png)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.xbm)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/x-xbitmap)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.xpm)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/x-xpixmap)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.xwd)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/x-xwindowdump)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.css)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/css)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.html)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (text/html)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.htm)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/html)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.js)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (text/javascript)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.asc)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.c)
                    (Right_DoubleQuote '"')
                    ('            =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.cpp)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.log)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.conf)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.text)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.txt)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.dtd)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/xml)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.xml)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/xml)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.mpeg)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (video/mpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.mpg)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/mpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.mov)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/quicktime)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.qt)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (video/quicktime)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.avi)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-msvideo)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.asf)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-ms-asf)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.asx)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-ms-asf)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.wmv)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-ms-wmv)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.bz2)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bzip)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.tbz)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bzip-compressed-tar)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (.tar.bz2)
                    (Right_DoubleQuote '"')
                    ('      =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bzip-compressed-tar)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('  ')
                    (Right_DoubleQuote '"')
                    (Right_DoubleQuote '"')
                    ('              =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    ('\n')
                    (' )\n')
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(x) (DQ ($ VSub_DollarName '$local'))} {(Lit_Other '=')} {(xtrue)})
                (command.Simple
                  words: [{(echo)} {(SQ <'server.bind = "127.0.0.1"'>)}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_DGreat '>>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: apache2_conf
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$module_path'))})]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-d)} {(DQ (/usr/lib/httpd/modules))})
                        (command.Assignment
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:module_path)
                              op: Equal
                              rhs: {(DQ (/usr/lib/httpd/modules))}
                            )
                          ]
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-d)} {(DQ (/usr/lib/apache2/modules))})
                        (command.Assignment
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:module_path)
                              op: Equal
                              rhs: {(DQ (/usr/lib/apache2/modules))}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:bind) op:Equal rhs:(word.Empty))]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test)} {(x) (DQ ($ VSub_DollarName '$local'))} {(Lit_Other '=')} {(xtrue)})
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:bind)
                      op: Equal
                      rhs: {(SQ <'127.0.0.1:'>)}
                    )
                  ]
                )
              ]
            )
            (command.Simple
              words: [{(echo)} {(SQ <'text/css css'>)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$fqgitdir') (/mime.types))}
                )
              ]
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 1999
                  stdin_parts: [
                    ('ServerName ')
                    (Right_DoubleQuote '"')
                    (git-instaweb)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('ServerRoot ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$root')
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('DocumentRoot ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$root')
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('ErrorLog ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    (/error.log)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('CustomLog ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    (/access.log)
                    (Right_DoubleQuote '"')
                    (' combined\n')
                    ('PidFile ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/pid)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('Listen ')
                    ($ VSub_DollarName '$bind')
                    ($ VSub_DollarName '$port')
                    ('\n')
                  ]
                )
              ]
            )
            (command.ForEach
              iter_name: mod
              iter_words: [{(mpm_event)} {(mpm_prefork)} {(mpm_worker)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(-e)} 
                              {($ VSub_DollarName '$module_path') (/mod_) (${ VSub_Name mod) (.so)}
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(echo)}
                                {(DQ ('LoadModule ') (${ VSub_Name mod) ('_module '))}
                                {
                                  (DQ ($ VSub_DollarName '$module_path') (/mod_) (${ VSub_Name mod) 
                                    (.so)
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_DGreat '>>'>
                                  fd: 16777215
                                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Break break>
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.ForEach
              iter_name: mod
              iter_words: [{(mime)} {(dir)} {(env)} {(log_config)} {(authz_core)}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(-e)} 
                              {($ VSub_DollarName '$module_path') (/mod_) (${ VSub_Name mod) (.so)}
                            )
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(echo)}
                                {(DQ ('LoadModule ') (${ VSub_Name mod) ('_module '))}
                                {
                                  (DQ ($ VSub_DollarName '$module_path') (/mod_) (${ VSub_Name mod) 
                                    (.so)
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_DGreat '>>'>
                                  fd: 16777215
                                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
            )
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_DGreat '>>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 2166
                  stdin_parts: [
                    ('TypesConfig ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/mime.types)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('DirectoryIndex gitweb.cgi\n')
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$module_path') (/mod_perl.so))})
                        (command.Simple
                          words: [
                            {(sane_grep)}
                            {(SQ <MOD_PERL>)}
                            {(DQ ($ VSub_DollarName '$root') (/gitweb.cgi))}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                  action: [
                    (command.Simple
                      words: [{(cat)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_DGreat '>>'>
                          fd: 16777215
                          arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                        )
                        (redir.HereDoc
                          op: <Redir_DLess '<<'>
                          fd: 16777215
                          here_begin: {(EOF)}
                          here_end_span_id: 2237
                          stdin_parts: [
                            ('LoadModule perl_module ')
                            ($ VSub_DollarName '$module_path')
                            ('/mod_perl.so\n')
                            ('PerlPassEnv GIT_DIR\n')
                            ('PerlPassEnv GIT_EXEC_PATH\n')
                            ('PerlPassEnv GITWEB_CONFIG\n')
                            ('<Location /gitweb.cgi>\n')
                            ('\tSetHandler perl-script\n')
                            ('\tPerlResponseHandler ModPerl::Registry\n')
                            ('\tPerlOptions +ParseHeaders\n')
                            ('\tOptions +ExecCGI\n')
                            ('</Location>\n')
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (C {(resolve_full_httpd)})
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:list_mods)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.Pipeline
                                    children: [
                                      (C {(echo)} {(DQ ($ VSub_DollarName '$full_httpd'))})
                                      (C {(sed)} {(SQ <'s/-f$/-l/'>)})
                                    ]
                                    negated: F
                                  )
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.AndOr
                  ops: [Op_DPipe]
                  children: [
                    (command.Pipeline
                      children: [
                        (C {($ VSub_DollarName '$list_mods')})
                        (command.Simple
                          words: [{(sane_grep)} {(SQ <'mod_cgi\\.c'>)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: <Redir_GreatAnd '2>&'>
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                      negated: F
                    )
                    (command.If
                      arms: [
                        (if_arm
                          cond: [
                            (C {(test)} {(-f)} {(DQ ($ VSub_DollarName '$module_path') (/mod_cgi.so))})
                          ]
                          action: [
                            (command.Simple
                              words: [
                                {(echo)}
                                {
                                  (DQ ('LoadModule cgi_module ') ($ VSub_DollarName '$module_path') 
                                    (/mod_cgi.so)
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_DGreat '>>'>
                                  fd: 16777215
                                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (command.AndOr
                          ops: [Op_DPipe]
                          children: [
                            (command.Pipeline
                              children: [
                                (C {($ VSub_DollarName '$list_mods')})
                                (command.Simple
                                  words: [{(grep)} {(SQ <'mod_cgid\\.c'>)}]
                                  redirects: [
                                    (redir.Redir
                                      op: <Redir_Great '>'>
                                      fd: 16777215
                                      arg_word: {(/dev/null)}
                                    )
                                    (redir.Redir
                                      op: <Redir_GreatAnd '2>&'>
                                      fd: 2
                                      arg_word: {(1)}
                                    )
                                  ]
                                )
                              ]
                              negated: F
                            )
                            (command.If
                              arms: [
                                (if_arm
                                  cond: [
                                    (C {(test)} {(-f)} 
                                      {(DQ ($ VSub_DollarName '$module_path') (/mod_cgid.so))}
                                    )
                                  ]
                                  action: [
                                    (command.Simple
                                      words: [
                                        {(echo)}
                                        {
                                          (DQ ('LoadModule cgid_module ') 
                                            ($ VSub_DollarName '$module_path') (/mod_cgid.so)
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_DGreat '>>'>
                                          fd: 16777215
                                          arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                              else_action: [
                                (C {(echo)} {(DQ ('You have no CGI support!'))})
                                (command.ControlFlow
                                  token: <ControlFlow_Exit exit>
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                        )
                        (command.Simple
                          words: [{(echo)} {(DQ ('ScriptSock logs/gitweb.sock'))}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_DGreat '>>'>
                              fd: 16777215
                              arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
                (command.Simple
                  words: [{(cat)}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_DGreat '>>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                    )
                    (redir.HereDoc
                      op: <Redir_DLess '<<'>
                      fd: 16777215
                      here_begin: {(EOF)}
                      here_end_span_id: 2425
                      stdin_parts: [
                        ('PassEnv GIT_DIR\n')
                        ('PassEnv GIT_EXEC_PATH\n')
                        ('PassEnv GITWEB_CONFIG\n')
                        ('AddHandler cgi-script .cgi\n')
                        ('<Location /gitweb.cgi>\n')
                        ('\tOptions +ExecCGI\n')
                        ('</Location>\n')
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: mongoose_conf
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$conf'))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 2494
                  stdin_parts: [
                    ('# Mongoose web server configuration file.\n')
                    ("# Lines starting with '#' and empty lines are ignored.\n")
                    ('# For detailed description of every option, visit\n')
                    ('# http://code.google.com/p/mongoose/wiki/MongooseManual\n')
                    ('\n')
                    ('root\t\t')
                    ($ VSub_DollarName '$root')
                    ('\n')
                    ('ports\t\t')
                    ($ VSub_DollarName '$port')
                    ('\n')
                    ('index_files\tgitweb.cgi\n')
                    ('#ssl_cert\t')
                    ($ VSub_DollarName '$fqgitdir')
                    ('/gitweb/ssl_cert.pem\n')
                    ('error_log\t')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    ('/error.log\n')
                    ('access_log\t')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    ('/access.log\n')
                    ('\n')
                    ('#cgi setup\n')
                    ('cgi_env\t\tPATH=')
                    ($ VSub_DollarName '$PATH')
                    (',GIT_DIR=')
                    ($ VSub_DollarName '$GIT_DIR')
                    (',GIT_EXEC_PATH=')
                    ($ VSub_DollarName '$GIT_EXEC_PATH')
                    (',GITWEB_CONFIG=')
                    ($ VSub_DollarName '$GITWEB_CONFIG')
                    ('\n')
                    ('cgi_interp\t')
                    ($ VSub_DollarName '$PERL')
                    ('\n')
                    ('cgi_ext\t\tcgi,pl\n')
                    ('\n')
                    ('# mimetype mapping\n')
                    (
'mime_types\t.gz=application/x-gzip,.tar.gz=application/x-tgz,.tgz=application/x-tgz,.tar=application/x-tar,.zip=application/zip,.gif=image/gif,.jpg=image/jpeg,.jpeg=image/jpeg,.png=image/png,.css=text/css,.html=text/html,.htm=text/html,.js=text/javascript,.c=text/plain,.cpp=text/plain,.log=text/plain,.conf=text/plain,.text=text/plain,.txt=text/plain,.dtd=text/xml,.bz2=application/x-bzip,.tbz=application/x-bzip-compressed-tar,.tar.bz2=application/x-bzip-compressed-tar\n'
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: plackup_conf
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/gitweb.psgi))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 3211
                  stdin_parts: [
                    ('#!')
                    ($ VSub_DollarName '$PERL')
                    ('\n')
                    ('\n')
                    ('# gitweb - simple web interface to track changes in git repositories\n')
                    ('#          PSGI wrapper and server starter (see http://plackperl.org)\n')
                    ('\n')
                    ('use strict;\n')
                    ('\n')
                    ('use IO::Handle;\n')
                    ('use Plack::MIME;\n')
                    ('use Plack::Builder;\n')
                    ('use Plack::App::WrapCGI;\n')
                    (
'use CGI::Emulate::PSGI 0.07; # minimum version required to work with gitweb\n'
                    )
                    ('\n')
                    ('# mimetype mapping (from lighttpd_conf)\n')
                    ('Plack::MIME->add_type(\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.pdf)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/pdf)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.sig)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/pgp-signature)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.spl)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/futuresplash)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.class)
                    (Right_DoubleQuote '"')
                    ('        =>      ')
                    (Right_DoubleQuote '"')
                    (application/octet-stream)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.ps)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (application/postscript)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.torrent)
                    (Right_DoubleQuote '"')
                    ('      =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bittorrent)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.dvi)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-dvi)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.gz)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-gzip)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.pac)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-ns-proxy-autoconfig)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.swf)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-shockwave-flash)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.tar.gz)
                    (Right_DoubleQuote '"')
                    ('       =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-tgz)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.tgz)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-tgz)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.tar)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-tar)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.zip)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/zip)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.mp3)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/mpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.m3u)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-mpegurl)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.wma)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-ms-wma)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.wax)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-ms-wax)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.ogg)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/ogg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.wav)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (audio/x-wav)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.gif)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/gif)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.jpg)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/jpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.jpeg)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (image/jpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.png)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/png)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.xbm)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/x-xbitmap)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.xpm)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/x-xpixmap)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.xwd)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (image/x-xwindowdump)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.css)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/css)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.html)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (text/html)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.htm)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/html)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.js)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (text/javascript)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.asc)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.c)
                    (Right_DoubleQuote '"')
                    ('            =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.cpp)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.log)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.conf)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.text)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.txt)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.dtd)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/xml)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.xml)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (text/xml)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.mpeg)
                    (Right_DoubleQuote '"')
                    ('         =>      ')
                    (Right_DoubleQuote '"')
                    (video/mpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.mpg)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/mpeg)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.mov)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/quicktime)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.qt)
                    (Right_DoubleQuote '"')
                    ('           =>      ')
                    (Right_DoubleQuote '"')
                    (video/quicktime)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.avi)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-msvideo)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.asf)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-ms-asf)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.asx)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-ms-asf)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.wmv)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (video/x-ms-wmv)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.bz2)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bzip)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.tbz)
                    (Right_DoubleQuote '"')
                    ('          =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bzip-compressed-tar)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (.tar.bz2)
                    (Right_DoubleQuote '"')
                    ('      =>      ')
                    (Right_DoubleQuote '"')
                    (application/x-bzip-compressed-tar)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t')
                    (Right_DoubleQuote '"')
                    (Right_DoubleQuote '"')
                    ('              =>      ')
                    (Right_DoubleQuote '"')
                    (text/plain)
                    (Right_DoubleQuote '"')
                    ('\n')
                    (');\n')
                    ('\n')
                    ('my ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app = builder {\n')
                    ('\t# to be able to override ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('SIG{__WARN__} to log build time warnings\n')
                    ('\tuse CGI::Carp; # it sets ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('SIG{__WARN__} itself\n')
                    ('\n')
                    ('\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('logdir = ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/)
                    ($ VSub_DollarName '$httpd_only')
                    (Right_DoubleQuote '"')
                    (';\n')
                    ('\topen my ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("access_log_fh, '>>', ")
                    (Right_DoubleQuote '"')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    (logdir/access.log)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('\t\tor die ')
                    (Right_DoubleQuote '"')
                    ("Couldn't open access log '")
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("logdir/access.log': ")
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('!')
                    (Right_DoubleQuote '"')
                    (';\n')
                    ('\topen my ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("error_log_fh,  '>>', ")
                    (Right_DoubleQuote '"')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    (logdir/error.log)
                    (Right_DoubleQuote '"')
                    ('\n')
                    ('\t\tor die ')
                    (Right_DoubleQuote '"')
                    ("Couldn't open error log '")
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("logdir/error.log': ")
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('!')
                    (Right_DoubleQuote '"')
                    (';\n')
                    ('\n')
                    ('\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('access_log_fh->autoflush(1);\n')
                    ('\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('error_log_fh->autoflush(1);\n')
                    ('\n')
                    ('\t# redirect build time warnings to error.log\n')
                    ('\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("SIG{'__WARN__'} = sub {\n")
                    ('\t\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('msg = shift;\n')
                    ('\t\t# timestamp warning like in CGI::Carp::warn\n')
                    ('\t\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('stamp = CGI::Carp::stamp();\n')
                    ('\t\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('msg =~ s/^/')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('stamp/gm;\n')
                    ('\t\tprint ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('error_log_fh ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('msg;\n')
                    ('\t};\n')
                    ('\n')
                    ('\t# write errors to error.log, access to access.log\n')
                    ("\tenable 'AccessLog',\n")
                    ('\t\tformat => ')
                    (Right_DoubleQuote '"')
                    (combined)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ('\t\tlogger => sub { print ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('access_log_fh @_; };\n')
                    ('\tenable sub {\n')
                    ('\t\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app = shift;\n')
                    ('\t\tsub {\n')
                    ('\t\t\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('env = shift;\n')
                    ('\t\t\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("env->{'psgi.errors'} = ")
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('error_log_fh;\n')
                    ('\t\t\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app->(')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('env);\n')
                    ('\t\t}\n')
                    ('\t};\n')
                    ("\t# gitweb currently doesn't work with ")
                    ($ VSub_DollarName '$SIG')
                    ("{CHLD} set to 'IGNORE',\n")
                    ("\t# because it uses 'close ")
                    ($ VSub_DollarName '$fd')
                    (" or die...' on piped filehandle ")
                    ($ VSub_DollarName '$fh')
                    ('\n')
                    ('\t# (which causes the parent process to wait for child to finish).\n')
                    ('\tenable_if { ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("SIG{'CHLD'} eq 'IGNORE' } sub {\n")
                    ('\t\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app = shift;\n')
                    ('\t\tsub {\n')
                    ('\t\t\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('env = shift;\n')
                    ('\t\t\tlocal ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("SIG{'CHLD'} = 'DEFAULT';\n")
                    ('\t\t\tlocal ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("SIG{'CLD'}  = 'DEFAULT';\n")
                    ('\t\t\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app->(')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('env);\n')
                    ('\t\t}\n')
                    ('\t};\n')
                    ('\t# serve static files, i.e. stylesheet, images, script\n')
                    ("\tenable 'Static',\n")
                    ('\t\tpath => sub { m!')
                    (Lit_Other '\\')
                    ('.(js|css|png)')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('! && s!^/gitweb/!! },\n')
                    ('\t\troot => ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$root')
                    (/)
                    (Right_DoubleQuote '"')
                    (',\n')
                    ("\t\tencoding => 'utf-8'; # encoding for 'text/plain' files\n")
                    ('\t# convert CGI application to PSGI app\n')
                    ('\tPlack::App::WrapCGI->new(script => ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$root')
                    (/gitweb.cgi)
                    (Right_DoubleQuote '"')
                    (')->to_app;\n')
                    ('};\n')
                    ('\n')
                    ('# make it runnable as standalone app,\n')
                    ("# like it would be run via 'plackup' utility\n")
                    ('if (caller) {\n')
                    ('\treturn ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app;\n')
                    ('} else {\n')
                    ('\trequire Plack::Runner;\n')
                    ('\n')
                    ('\tmy ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('runner = Plack::Runner->new();\n')
                    ('\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('runner->parse_options(qw(--env deployment --port ')
                    ($ VSub_DollarName '$port')
                    ('),\n')
                    ('\t\t\t\t')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$local')
                    (Right_DoubleQuote '"')
                    (' ? qw(--host 127.0.0.1) : ());\n')
                    ('\t')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('runner->run(')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('app);\n')
                    ('}\n')
                    ('__END__\n')
                  ]
                )
              ]
            )
            (C {(chmod)} {(a) (Lit_Other '+') (x)} 
              {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/gitweb.psgi))}
            )
            (C {(rm)} {(-f)} {(DQ ($ VSub_DollarName '$conf'))})
          ]
        )
    )
    (command.FuncDef
      name: gitweb_conf
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{(cat)}]
              redirects: [
                (redir.Redir
                  op: <Redir_Great '>'>
                  fd: 16777215
                  arg_word: {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/gitweb_config.perl))}
                )
                (redir.HereDoc
                  op: <Redir_DLess '<<'>
                  fd: 16777215
                  here_begin: {(EOF)}
                  here_end_span_id: 3291
                  stdin_parts: [
                    ('#!@@PERL@@\n')
                    ('our ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('projectroot = ')
                    (Right_DoubleQuote '"')
                    (word_part.CommandSub
                      left_token: <Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {(dirname)} {(DQ ($ VSub_DollarName '$fqgitdir'))})]
                        )
                    )
                    (Right_DoubleQuote '"')
                    (';\n')
                    ('our ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('git_temp = ')
                    (Right_DoubleQuote '"')
                    ($ VSub_DollarName '$fqgitdir')
                    (/gitweb/tmp)
                    (Right_DoubleQuote '"')
                    (';\n')
                    ('our ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('projects_list = ')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ('projectroot;\n')
                    ('\n')
                    (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>)
                    ("feature{'remote_heads'}{'default'} = [1];\n")
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: configure_httpd
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$httpd'))}
              arms: [
                (case_arm
                  pat_list: [{(Lit_Star '*') (lighttpd) (Lit_Star '*')}]
                  action: [(C {(lighttpd_conf)})]
                )
                (case_arm
                  pat_list: [
                    {(Lit_Star '*') (apache2) (Lit_Star '*')}
                    {(Lit_Star '*') (httpd) (Lit_Star '*')}
                  ]
                  action: [(C {(apache2_conf)})]
                )
                (case_arm pat_list:[{(webrick)}] action:[(C {(webrick_conf)})])
                (case_arm
                  pat_list: [{(Lit_Star '*') (mongoose) (Lit_Star '*')}]
                  action: [(C {(mongoose_conf)})]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*') (plackup) (Lit_Star '*')}]
                  action: [(C {(plackup_conf)})]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [
                    (C {(echo)} {(DQ ('Unknown httpd specified: ') ($ VSub_DollarName '$httpd'))})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$action'))}
      arms: [
        (case_arm
          pat_list: [{(stop)}]
          action: [(C {(stop_httpd)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})]
        )
        (case_arm
          pat_list: [{(start)}]
          action: [
            (C {(start_httpd)})
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
        )
        (case_arm
          pat_list: [{(restart)}]
          action: [
            (C {(stop_httpd)})
            (C {(start_httpd)})
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})
          ]
        )
      ]
    )
    (C {(gitweb_conf)})
    (C {(resolve_full_httpd)})
    (C {(mkdir)} {(-p)} 
      {(DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd_only'))}
    )
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:conf)
          op: Equal
          rhs: 
            {
              (DQ ($ VSub_DollarName '$fqgitdir') (/gitweb/) ($ VSub_DollarName '$httpd_only') (.conf))
            }
        )
      ]
    )
    (C {(configure_httpd)})
    (C {(start_httpd)})
    (command.Assignment
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:url)
          op: Equal
          rhs: {(http) (Lit_Other ':') (//127.0.0.1) (Lit_Other ':') ($ VSub_DollarName '$port')}
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$browser'))})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {(httpd_is_ready)})
                (C {(git)} {(web--browse)} {(-b)} {(DQ ($ VSub_DollarName '$browser'))} 
                  {($ VSub_DollarName '$url')}
                )
                (C {(echo)} {($ VSub_DollarName '$url')})
              ]
            )
          ]
        )
      ]
      else_action: [
        (command.AndOr
          ops: [Op_DAmp Op_DPipe]
          children: [
            (C {(httpd_is_ready)})
            (C {(git)} {(web--browse)} {(-c)} {(DQ (instaweb.browser))} {($ VSub_DollarName '$url')})
            (C {(echo)} {($ VSub_DollarName '$url')})
          ]
        )
      ]
    )
  ]
)