(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <gitweb_init>
      name: gitweb_init
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'safe_pwd='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'safe_pwd='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'safe_pwd='> name:safe_pwd)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <perl>
                              more_env: []
                              words: [
                                {<perl>}
                                {<-MPOSIX> <Id.Lit_Equals '='> <getcwd>}
                                {<-e>}
                                {(SQ <'print quotemeta(getcwd)'>)}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <cat>
              more_env: []
              words: [{<cat>}]
              redirects: [
                (Redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<gitweb_config.perl>}
                )
                (Redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_tok: <Id.Undefined_Tok ''>
                      stdin_parts: [
                        <'#!/usr/bin/perl\n'>
                        <'\n'>
                        <'# gitweb configuration for tests\n'>
                        <'\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'version = \'current\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'GIT = \'git\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'projectroot = '>
                        <Id.Right_DoubleQuote '"'>
                        ($ Id.VSub_DollarName safe_pwd)
                        <Id.Right_DoubleQuote '"'>
                        <';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'project_maxdepth = 8;\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'home_link_str = \'projects\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'site_name = \'[localhost]\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'site_html_head_string = \'\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'site_header = \'\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'site_footer = \'\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'home_text = \'indextext.html\';\n'>
                        <'our @stylesheets = (\'file:///'>
                        ($ Id.VSub_DollarName GIT_BUILD_DIR)
                        <'/gitweb/static/gitweb.css\');\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'logo = \'file:///'>
                        ($ Id.VSub_DollarName GIT_BUILD_DIR)
                        <'/gitweb/static/git-logo.png\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'favicon = \'file:///'>
                        ($ Id.VSub_DollarName GIT_BUILD_DIR)
                        <'/gitweb/static/git-favicon.png\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'projects_list = \'\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'export_ok = \'\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'strict_export = \'\';\n'>
                        <'our '>
                        (word_part.EscapedLiteral
                          token: <Id.Lit_EscapedChar '\\$'>
                          ch: '$'
                        )
                        <'maxload = undef;\n'>
                        <'\n'>
                      ]
                    )
                )
              ]
              do_fork: T
            )
            (command.Simple
              blame_tok: <cat>
              more_env: []
              words: [{<cat>}]
              redirects: [
                (Redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'.git/description'>}
                )
                (Redir
                  op: <Id.Redir_DLess '<<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: 
                    (redir_param.HereDoc
                      here_begin: {<EOF>}
                      here_end_tok: <Id.Undefined_Tok ''>
                      stdin_parts: [($ Id.VSub_Number 0) <' test repository\n'>]
                    )
                )
              ]
              do_fork: T
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {<-n>} {(DQ ($ Id.VSub_DollarName GITWEB_TEST_INSTALLED))}]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.If
                      if_kw: <Id.KW_If if>
                      arms: [
                        (IfArm
                          keyword: <Id.KW_If if>
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (command.Simple
                                      blame_tok: <test>
                                      more_env: []
                                      words: [
                                        {<test>}
                                        {<-d>}
                                        {($ Id.VSub_DollarName GITWEB_TEST_INSTALLED)}
                                      ]
                                      redirects: []
                                      do_fork: T
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          then_kw: <Id.KW_Then then>
                          action: [
                            (command.ShAssignment
                              left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                              pairs: [
                                (AssignPair
                                  left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                                  lhs: 
                                    (sh_lhs_expr.Name
                                      left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                                      name: SCRIPT_NAME
                                    )
                                  op: assign_op.Equal
                                  rhs: 
                                    {
                                      (DQ ($ Id.VSub_DollarName GITWEB_TEST_INSTALLED) <'/gitweb.cgi'>)
                                    }
                                )
                              ]
                              redirects: []
                            )
                          ]
                          spids: [163 172]
                        )
                      ]
                      else_kw: <Id.KW_Else else>
                      else_action: [
                        (command.ShAssignment
                          left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                          pairs: [
                            (AssignPair
                              left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                              lhs: 
                                (sh_lhs_expr.Name
                                  left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                                  name: SCRIPT_NAME
                                )
                              op: assign_op.Equal
                              rhs: {(DQ ($ Id.VSub_DollarName GITWEB_TEST_INSTALLED))}
                            )
                          ]
                          redirects: []
                        )
                      ]
                      fi_kw: <Id.KW_Fi fi>
                      redirects: []
                    )
                    (command.AndOr
                      children: [
                        (command.Simple
                          blame_tok: <test>
                          more_env: []
                          words: [{<test>} {<-f>} {(DQ ($ Id.VSub_DollarName SCRIPT_NAME))}]
                          redirects: []
                          do_fork: T
                        )
                        (command.Simple
                          blame_tok: <error>
                          more_env: []
                          words: [
                            {<error>}
                            {
                              (DQ <'Cannot find gitweb at '> 
                                ($ Id.VSub_DollarName GITWEB_TEST_INSTALLED) <.>
                              )
                            }
                          ]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: [<Id.Op_DPipe _>]
                    )
                    (command.Simple
                      blame_tok: <say>
                      more_env: []
                      words: [{<say>} {(DQ <'# Testing '> ($ Id.VSub_DollarName SCRIPT_NAME))}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [148 160]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'SCRIPT_NAME='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SCRIPT_NAME='> name:SCRIPT_NAME)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_DollarName GIT_BUILD_DIR) <'/gitweb/gitweb.perl'>)}
                    )
                  ]
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [{<export>} {<SCRIPT_NAME>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShFunction
      name_tok: <gitweb_run>
      name: gitweb_run
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'GATEWAY_INTERFACE='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'GATEWAY_INTERFACE='>
                  lhs: 
                    (sh_lhs_expr.Name
                      left: <Id.Lit_VarLike 'GATEWAY_INTERFACE='>
                      name: GATEWAY_INTERFACE
                    )
                  op: assign_op.Equal
                  rhs: {(SQ <'CGI/1.1'>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'HTTP_ACCEPT='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'HTTP_ACCEPT='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HTTP_ACCEPT='> name:HTTP_ACCEPT)
                  op: assign_op.Equal
                  rhs: {(SQ <'*/*'>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'REQUEST_METHOD='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'REQUEST_METHOD='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'REQUEST_METHOD='> name:REQUEST_METHOD)
                  op: assign_op.Equal
                  rhs: {(SQ <GET>)}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'QUERY_STRING='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'QUERY_STRING='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'QUERY_STRING='> name:QUERY_STRING)
                  op: assign_op.Equal
                  rhs: {(DQ ) ($ Id.VSub_Number 1) (DQ )}
                )
              ]
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'PATH_INFO='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'PATH_INFO='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH_INFO='> name:PATH_INFO)
                  op: assign_op.Equal
                  rhs: {(DQ ) ($ Id.VSub_Number 2) (DQ )}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [
                {<export>}
                {<GATEWAY_INTERFACE>}
                {<HTTP_ACCEPT>}
                {<REQUEST_METHOD>}
                {<QUERY_STRING>}
                {<PATH_INFO>}
              ]
              redirects: []
              do_fork: T
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'GITWEB_CONFIG='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'GITWEB_CONFIG='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'GITWEB_CONFIG='> name:GITWEB_CONFIG)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.Simple
                            blame_tok: <pwd>
                            more_env: []
                            words: [{<pwd>}]
                            redirects: []
                            do_fork: T
                          )
                        right: <Id.Eof_RParen _>
                      ) <'/gitweb_config.perl'>
                    }
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <export>
              more_env: []
              words: [{<export>} {<GITWEB_CONFIG>}]
              redirects: []
              do_fork: T
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <rm>
                  more_env: []
                  words: [{<rm>} {<-f>} {<gitweb.log>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <perl>
                  more_env: []
                  words: [{<perl>} {<-->} {(DQ ($ Id.VSub_DollarName SCRIPT_NAME))}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<gitweb.output>}
                    )
                    (Redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<gitweb.log>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <perl>
                  more_env: []
                  words: [
                    {<perl>}
                    {<-w>}
                    {<-e>}
                    {
                      (SQ <'\n'> <'\t\topen O, ">gitweb.headers";\n'> <'\t\twhile (<>) {\n'> 
                        <'\t\t\tprint O;\n'> <'\t\t\tlast if (/^\\r$/ || /^$/);\n'> <'\t\t}\n'> <'\t\topen O, ">gitweb.body";\n'> 
                        <'\t\twhile (<>) {\n'> <'\t\t\tprint O;\n'> <'\t\t}\n'> <'\t\tclose O;\n'> <'\t'>
                      )
                    }
                    {<gitweb.output>}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (command.Simple
                                  blame_tok: <grep>
                                  more_env: []
                                  words: [{<grep>} {(SQ <'^[[]'>)} {<gitweb.log>}]
                                  redirects: [
                                    (Redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (Redir
                                      op: <Id.Redir_GreatAnd '2>&'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<1>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <test_debug>
                              more_env: []
                              words: [{<test_debug>} {(SQ <'cat gitweb.log >&2'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <false>
                              more_env: []
                              words: [{<false>}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                      spids: [382 399]
                    )
                  ]
                  else_kw: <Id.KW_Else else>
                  else_action: [
                    (command.Simple
                      blame_tok: <true>
                      more_env: []
                      words: [{<true>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.If
      if_kw: <Id.KW_If if>
      arms: [
        (IfArm
          keyword: <Id.KW_If if>
          cond: 
            (condition.Shell
              commands: [
                (command.Sentence
                  child: 
                    (command.Pipeline
                      negated: <Id.KW_Bang '!'>
                      children: [
                        (command.Simple
                          blame_tok: <test_have_prereq>
                          more_env: []
                          words: [{<test_have_prereq>} {<PERL>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      ops: []
                    )
                  terminator: <Id.Op_Semi _>
                )
              ]
            )
          then_kw: <Id.KW_Then then>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'skip_all='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'skip_all='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'skip_all='> name:skip_all)
                  op: assign_op.Equal
                  rhs: {(SQ <'skipping gitweb tests, perl not available'>)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_done>
              more_env: []
              words: [{<test_done>}]
              redirects: []
              do_fork: T
            )
          ]
          spids: [447 456]
        )
      ]
      else_action: []
      fi_kw: <Id.KW_Fi fi>
      redirects: []
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <perl>
          more_env: []
          words: [{<perl>} {<-MEncode>} {<-e>} {(SQ <'$e="";decode_utf8($e, Encode::FB_CROAK)'>)}]
          redirects: [
            (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})
            (Redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
          ]
          do_fork: T
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'skip_all='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'skip_all='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'skip_all='> name:skip_all)
                  op: assign_op.Equal
                  rhs: {(SQ <'skipping gitweb tests, perl version is too old'>)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_done>
              more_env: []
              words: [{<test_done>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <perl>
          more_env: []
          words: [
            {<perl>}
            {<-MCGI>}
            {<-MCGI> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <Util>}
            {<-MCGI> <Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <Carp>}
            {<-e>}
            {<0>}
          ]
          redirects: [
            (Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})
            (Redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})
          ]
          do_fork: T
        )
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'skip_all='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'skip_all='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'skip_all='> name:skip_all)
                  op: assign_op.Equal
                  rhs: {(SQ <'skipping gitweb tests, CGI module unusable'>)}
                )
              ]
              redirects: []
            )
            (command.Simple
              blame_tok: <test_done>
              more_env: []
              words: [{<test_done>}]
              redirects: []
              do_fork: T
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
      ]
      ops: [<Id.Op_DPipe _>]
    )
    (command.Simple
      blame_tok: <gitweb_init>
      more_env: []
      words: [{<gitweb_init>}]
      redirects: []
      do_fork: T
    )
  ]
)