(command.CommandList children: [ (command.ShFunction name: gitweb_init body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:safe_pwd) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<perl>} {<-MPOSIX> <Id.Lit_Equals '='> <getcwd>} {<-e>} {(SQ <'print quotemeta(getcwd)'>)} ) ) ) } spids: [24] ) ] ) (command.Simple 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.MultiLine here_begin: {<EOF>} here_end_span_id: 115 stdin_parts: [ <'#!/usr/bin/perl\n'> <'\n'> <'# gitweb configuration for tests\n'> <'\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'version = \'current\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'GIT = \'git\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'projectroot = '> <Id.Right_DoubleQuote '"'> ($ Id.VSub_DollarName '$safe_pwd') <Id.Right_DoubleQuote '"'> <';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'project_maxdepth = 8;\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'home_link_str = \'projects\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'site_name = \'[localhost]\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'site_html_head_string = \'\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'site_header = \'\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'site_footer = \'\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'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 '\\$'> ) <'logo = \'file:///'> ($ Id.VSub_DollarName '$GIT_BUILD_DIR') <'/gitweb/static/git-logo.png\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'favicon = \'file:///'> ($ Id.VSub_DollarName '$GIT_BUILD_DIR') <'/gitweb/static/git-favicon.png\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'projects_list = \'\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'export_ok = \'\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'strict_export = \'\';\n'> <'our '> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\$'> ) <'maxload = undef;\n'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple 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.MultiLine here_begin: {<EOF>} here_end_span_id: 129 stdin_parts: [($ Id.VSub_Number '$0') <' test repository\n'>] ) ) ] do_fork: T ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<test>} {<-n>} {(DQ ($ Id.VSub_DollarName '$GITWEB_TEST_INSTALLED'))}) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<test>} {<-d>} {($ Id.VSub_DollarName '$GITWEB_TEST_INSTALLED')}) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SCRIPT_NAME) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$GITWEB_TEST_INSTALLED') <'/gitweb.cgi'> ) } spids: [175] ) ] ) ] spids: [163 172] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SCRIPT_NAME) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$GITWEB_TEST_INSTALLED'))} spids: [185] ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} {<-f>} {(DQ ($ Id.VSub_DollarName '$SCRIPT_NAME'))}) (C {<error>} { (DQ <'Cannot find gitweb at '> ($ Id.VSub_DollarName '$GITWEB_TEST_INSTALLED') <.> ) } ) ] ) (C {<say>} {(DQ <'# Testing '> ($ Id.VSub_DollarName '$SCRIPT_NAME'))}) ] spids: [148 160] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SCRIPT_NAME) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$GIT_BUILD_DIR') <'/gitweb/gitweb.perl'>)} spids: [228] ) ] ) ] ) (C {<export>} {<SCRIPT_NAME>}) ] ) ) (command.ShFunction name: gitweb_run body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GATEWAY_INTERFACE) op: assign_op.Equal rhs: {(SQ <'CGI/1.1'>)} spids: [253] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HTTP_ACCEPT) op: assign_op.Equal rhs: {(SQ <'*/*'>)} spids: [259] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:REQUEST_METHOD) op: assign_op.Equal rhs: {(SQ <GET>)} spids: [265] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:QUERY_STRING) op: assign_op.Equal rhs: {(DQ ) ($ Id.VSub_Number '$1') (DQ )} spids: [271] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PATH_INFO) op: assign_op.Equal rhs: {(DQ ) ($ Id.VSub_Number '$2') (DQ )} spids: [279] ) ] ) (C {<export>} {<GATEWAY_INTERFACE>} {<HTTP_ACCEPT>} {<REQUEST_METHOD>} {<QUERY_STRING>} {<PATH_INFO>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GITWEB_CONFIG) op: assign_op.Equal rhs: {(command_sub left_token:<Id.Left_DollarParen '$('> child:(C {<pwd>})) <'/gitweb_config.perl'> } spids: [303] ) ] ) (C {<export>} {<GITWEB_CONFIG>}) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<rm>} {<-f>} {<gitweb.log>}) (command.Simple 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 ) (C {<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>} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Simple 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 _> ) ] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [(C {<test_debug>} {(SQ <'cat gitweb.log >&2'>)}) (C {<false>})] ) ] spids: [382 399] ) ] else_action: [(C {<true>})] ) ] ) ] ) ) (C {<.>} {<'./test-lib.sh'>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children:[(C {<test_have_prereq>} {<PERL>})] negated:T) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping gitweb tests, perl not available'>)} spids: [459] ) ] ) (C {<test_done>}) ] spids: [447 456] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple 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 children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping gitweb tests, perl version is too old'>)} spids: [491] ) ] ) (C {<test_done>}) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple 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 children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(SQ <'skipping gitweb tests, CGI module unusable'>)} spids: [531] ) ] ) (C {<test_done>}) ] ) ] ) (C {<gitweb_init>}) ] )