(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PERL spids:[21]) op: Equal rhs: {(SQ <'@@PERL@@'>)} spids: [21] ) ] spids: [21] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTIONS_KEEPDASHDASH spids:[26]) op: Equal rhs: (word.EmptyWord) spids: [26] ) ] spids: [26] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTIONS_STUCKLONG spids:[28]) op: Equal rhs: (word.EmptyWord) spids: [28] ) ] spids: [28] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:OPTIONS_SPEC spids:[30]) 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') ) } spids: [30] ) ] spids: [30] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SUBDIRECTORY_OK spids:[47]) op: Equal rhs: {(Yes)} spids: [47] ) ] spids: [47] ) (C {(.)} {(git-sh-setup)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:fqgitdir spids:[55]) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_DIR'))} spids: [55] ) ] spids: [55] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:local spids:[60]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(--bool)} {(--get)} {(instaweb.local)})] ) left_token: <Left_CommandSub '$('> spids: [62 72] ) ) } spids: [60] ) ] spids: [60] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd spids:[75]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(--get)} {(instaweb.httpd)})] ) left_token: <Left_CommandSub '$('> spids: [77 85] ) ) } spids: [75] ) ] spids: [75] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:root spids:[88]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(--get)} {(instaweb.gitwebdir)})] ) left_token: <Left_CommandSub '$('> spids: [90 98] ) ) } spids: [88] ) ] spids: [88] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:port spids:[101]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(--get)} {(instaweb.port)})] ) left_token: <Left_CommandSub '$('> spids: [102 110] ) } spids: [101] ) ] spids: [101] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:module_path spids:[112]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(config)} {(--get)} {(instaweb.modulepath)})] ) left_token: <Left_CommandSub '$('> spids: [114 122] ) ) } spids: [112] ) ] spids: [112] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:action spids:[125]) op: Equal rhs: {(DQ (browse))} spids: [125] ) ] spids: [125] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:conf spids:[131]) op: Equal rhs: {(DQ ($ VSub_Name '$GIT_DIR') (/gitweb/httpd.conf))} spids: [131] ) ] spids: [131] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$httpd'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd spids:[155]) op: Equal rhs: {(SQ <'lighttpd -f'>)} spids: [155] ) ] spids: [155] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$root'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:root spids:[174]) op: Equal rhs: {(SQ <'@@GITWEBDIR@@'>)} spids: [174] ) ] spids: [174] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ VSub_Name '$port'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:port spids:[193]) op: Equal rhs: {(1234)} spids: [193] ) ] spids: [193] ) ] ) (command.FuncDef name: resolve_full_httpd body: (command.BraceGroup children: [ (command.Case to_match: {(DQ ($ VSub_Name '$httpd'))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (apache2) (Lit_Other '*')} {(Lit_Other '*') (lighttpd) (Lit_Other '*')} {(Lit_Other '*') (httpd) (Lit_Other '*')} ] action: [ (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$httpd'))}) (command.SimpleCommand 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 keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd spids:[266]) op: Equal rhs: {(DQ ($ VSub_Name '$httpd') (' -f'))} spids: [266] ) ] spids: [266] ) ] spids: [16777215 263] ) ] spids: [16777215 273] ) ] spids: [214 225 276 16777215] ) (case_arm pat_list: [{(Lit_Other '*') (plackup) (Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:full_httpd spids:[289]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/gitweb.psgi))} spids: [289] ) ] spids: [289] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd_only spids:[296]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name httpd> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {(' *')} ) spids: [298 302] ) ) } spids: [296] ) ] spids: [296] ) (command.ControlFlow token:<ControlFlow_Return return>) ] spids: [279 282 312 16777215] ) (case_arm pat_list: [{(Lit_Other '*') (webrick) (Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:full_httpd spids:[329]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/webrick.rb))} spids: [329] ) ] spids: [329] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd_only spids:[336]) op: Equal rhs: { (DQ (word_part.BracedVarSub token: <VSub_Name httpd> suffix_op: (suffix_op.StringUnary op_id: VOp1_DPercent arg_word: {(' *')} ) spids: [338 342] ) ) } spids: [336] ) ] spids: [336] ) (command.ControlFlow token:<ControlFlow_Return return>) ] spids: [315 318 352 16777215] ) ] spids: [205 211 355] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd_only spids:[359]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ VSub_Name '$httpd')}) (C {(cut)} {(-f1)} {(-d) (SQ <' '>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [361 376] ) ) } spids: [359] ) ] spids: [359] ) (command.If arms: [ (if_arm cond: [ (command.Case to_match: {(DQ ($ VSub_Name '$httpd_only'))} arms: [ (case_arm pat_list: [{(/) (Lit_Other '*')}] action: [(C {(Lit_Other ':')})] spids: [390 392 396 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.SimpleCommand words: [{(which)} {($ VSub_Name '$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)} ) ] ) ] spids: [398 399 410 16777215] ) ] spids: [382 388 412] ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:full_httpd spids:[418]) op: Equal rhs: {($ VSub_Name '$httpd')} spids: [418] ) ] spids: [418] ) ] spids: [16777215 415] ) ] else_action: [ (command.ForEach iter_name: i iter_words: [ {(/usr/local/sbin)} {(/usr/sbin)} {(DQ ($ VSub_Name '$root'))} {(DQ ($ VSub_Name '$fqgitdir') (/gitweb))} ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {(-x)} {(DQ ($ VSub_Name '$i') (/) ($ VSub_Name '$httpd_only'))} ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:full_httpd spids:[480]) op: Equal rhs: {($ VSub_Name '$i') (/) ($ VSub_Name '$httpd')} spids: [480] ) ] spids: [480] ) (command.ControlFlow token: <ControlFlow_Return return> ) ] spids: [16777215 477] ) ] spids: [16777215 489] ) ] spids: [461 492] ) spids: [446 16777215] ) (command.SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Name '$httpd_only') (' not found. Install ') ($ VSub_Name '$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)}) ] spids: [422 520] ) ] spids: [202] ) spids: [197 201] ) (command.FuncDef name: start_httpd body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-f)} {(DQ ($ VSub_Name '$fqgitdir') (/pid))}) terminator: <Op_Semi ';'> ) ] action: [ (C {(say)} {(DQ ('Instance already running. Restarting...'))}) (C {(stop_httpd)}) ] spids: [16777215 545] ) ] spids: [16777215 558] ) (C {(resolve_full_httpd)}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:conf spids:[580]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') (.conf))} spids: [580] ) ] spids: [580] ) (command.AndOr ops: [Op_DPipe] children: [(C {(test)} {(-f)} {(DQ ($ VSub_Name '$conf'))}) (C {(configure_httpd)})] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-f)} {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/gitweb_config.perl))}) (C {(gitweb_conf)}) ] ) (command.Case to_match: {(DQ ($ VSub_Name '$httpd'))} arms: [ (case_arm pat_list: [ {(Lit_Other '*') (mongoose) (Lit_Other '*')} {(Lit_Other '*') (plackup) (Lit_Other '*')} ] action: [ (command.Sentence child: (C {($ VSub_Name '$full_httpd')} {(DQ ($ VSub_Name '$conf'))}) terminator: <Op_Amp '&'> ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:pid spids:[662]) op: Equal rhs: {($ VSub_Bang '$!')} spids: [662] ) ] spids: [662] ) (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_Name '$httpd') (.))} ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 679] ) ] spids: [16777215 696] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$fqgitdir') (/pid))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 715 stdin_parts: [($ VSub_Name '$pid') ('\n')] ) ] ) ] spids: [635 642 717 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {($ VSub_Name '$full_httpd')} {(DQ ($ VSub_Name '$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_Name '$httpd') (.))} ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 743] ) ] spids: [16777215 760] ) ] spids: [720 721 763 16777215] ) ] spids: [626 632 766] ) ] spids: [530] ) spids: [525 529] ) (command.FuncDef name: stop_httpd body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-f)} {(DQ ($ VSub_Name '$fqgitdir') (/pid))}) (C {(kill)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(cat)} {(DQ ($ VSub_Name '$fqgitdir') (/pid))})] ) left_token: <Left_CommandSub '$('> spids: [792 799] ) } ) ] ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$fqgitdir') (/pid))}) ] spids: [776] ) spids: [771 775] ) (command.FuncDef name: httpd_is_ready body: (command.BraceGroup children: [ (C {(DQ ($ VSub_Name '$PERL'))} {(-MIO) (Lit_Other ':') (Lit_Other ':') (Socket) (Lit_Other ':') (Lit_Other ':') (INET)} {(-e)} { (DQ ('\n') ('local ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('| = 1; # turn on autoflush\n') ("exit if (IO::Socket::INET->new('127.0.0.1:") ($ VSub_Name '$port') ("'));\n") ("print 'Waiting for ") (Lit_Other '\\') ("'") ($ VSub_Name '$httpd') (Lit_Other '\\') ("' to start ..';\n") ('do {\n') ("\tprint '.';\n") ('\tsleep(1);\n') ("} until (IO::Socket::INET->new('127.0.0.1:") ($ VSub_Name '$port') ("'));\n") ('print qq! (done)') (Lit_Other '\\') ('n!;\n') ) } ) ] spids: [819] ) spids: [814 818] ) (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 keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:action spids:[893]) op: Equal rhs: {(DQ (stop))} spids: [893] ) ] spids: [893] ) ] spids: [887 890 899 16777215] ) (case_arm pat_list: [{(--start)} {(start)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:action spids:[908]) op: Equal rhs: {(DQ (start))} spids: [908] ) ] spids: [908] ) ] spids: [902 905 914 16777215] ) (case_arm pat_list: [{(--restart)} {(restart)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:action spids:[923]) op: Equal rhs: {(DQ (restart))} spids: [923] ) ] spids: [923] ) ] spids: [917 920 929 16777215] ) (case_arm pat_list: [{(-l)} {(--local)}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:local spids:[938]) op: Equal rhs: {(true)} spids: [938] ) ] spids: [938] ) ] spids: [932 935 942 16777215] ) (case_arm pat_list: [{(-d)} {(--httpd)}] action: [ (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:httpd spids:[954]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [954] ) ] spids: [954] ) ] spids: [945 948 960 16777215] ) (case_arm pat_list: [{(-b)} {(--browser)}] action: [ (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:browser spids:[972]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [972] ) ] spids: [972] ) ] spids: [963 966 978 16777215] ) (case_arm pat_list: [{(-p)} {(--port)}] action: [ (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:port spids:[990]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [990] ) ] spids: [990] ) ] spids: [981 984 996 16777215] ) (case_arm pat_list: [{(-m)} {(--module-path)}] action: [ (C {(shift)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:module_path spids:[1008]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [1008] ) ] spids: [1008] ) ] spids: [999 1002 1014 16777215] ) (case_arm pat_list:[{(--)}] spids:[1017 1018 1021 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [(C {(usage)})] spids: [1024 1025 1031 16777215] ) ] spids: [878 884 1034] ) (C {(shift)}) ] spids: [875 1039] ) ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$GIT_DIR') (/gitweb/tmp))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GIT_EXEC_PATH spids:[1051]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(git)} {(--exec-path)})]) left_token: <Left_CommandSub '$('> spids: [1053 1057] ) ) } spids: [1051] ) ] spids: [1051] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GIT_DIR spids:[1060]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir'))} spids: [1060] ) ] spids: [1060] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:GITWEB_CONFIG spids:[1065]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/gitweb_config.perl))} spids: [1065] ) ] spids: [1065] ) (C {(export)} {(GIT_EXEC_PATH)} {(GIT_DIR)} {(GITWEB_CONFIG)}) (command.FuncDef name: webrick_conf body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:wrapper spids:[1100]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd') (/wrapper.sh))} spids: [1100] ) ] spids: [1100] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$wrapper'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1136 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_Name '$GIT_EXEC_PATH') (' GIT_DIR=') ($ VSub_Name '$GIT_DIR') (' GITWEB_CONFIG=') ($ VSub_Name '$GITWEB_CONFIG') ('\n') ('export GIT_EXEC_PATH GIT_DIR GITWEB_CONFIG\n') ('exec ') ($ VSub_Name '$root') ('/gitweb.cgi\n') ] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(DQ ($ VSub_Name '$wrapper'))}) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd') (.rb))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1234 stdin_parts: [ ('#!/usr/bin/env ruby\n') ("require 'webrick'\n") ("require 'logger'\n") ('options = {\n') (' :Port => ') ($ VSub_Name '$port') (',\n') (' :DocumentRoot => ') (Right_DoubleQuote '"') ($ VSub_Name '$root') (Right_DoubleQuote '"') (',\n') (" :Logger => Logger.new('") ($ VSub_Name '$fqgitdir') ("/gitweb/error.log'),\n") (' :AccessLog => [\n') (" [ Logger.new('") ($ VSub_Name '$fqgitdir') ("/gitweb/access.log'),\n") (' WEBrick::AccessLog::COMBINED_LOG_FORMAT ]\n') (' ],\n') (' :DirectoryIndex => [') (Right_DoubleQuote '"') (gitweb.cgi) (Right_DoubleQuote '"') ('],\n') (' :CGIInterpreter => ') (Right_DoubleQuote '"') ($ VSub_Name '$wrapper') (Right_DoubleQuote '"') (',\n') (' :StartCallback => lambda do\n') (' File.open(') (Right_DoubleQuote '"') ($ VSub_Name '$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_Name '$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_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd') (.rb))} ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$conf'))}) ] spids: [1085] ) spids: [1080 1084] ) (command.FuncDef name: lighttpd_conf body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 1829 stdin_parts: [ ('server.document-root = ') (Right_DoubleQuote '"') ($ VSub_Name '$root') (Right_DoubleQuote '"') ('\n') ('server.port = ') ($ VSub_Name '$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_Name '$fqgitdir') (/pid) (Right_DoubleQuote '"') ('\n') ('server.errorlog = ') (Right_DoubleQuote '"') ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$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_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$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_Name '$local'))} {(Lit_Other '=')} {(xtrue)}) (command.SimpleCommand words: [{(echo)} {(SQ <'server.bind = "127.0.0.1"'>)}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) ] ) ] ) ] spids: [1269] ) spids: [1264 1268] ) (command.FuncDef name: apache2_conf body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ VSub_Name '$module_path'))})] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-d)} {(DQ (/usr/lib/httpd/modules))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:module_path spids:[1892]) op: Equal rhs: {(DQ (/usr/lib/httpd/modules))} spids: [1892] ) ] spids: [1892] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-d)} {(DQ (/usr/lib/apache2/modules))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:module_path spids:[1909]) op: Equal rhs: {(DQ (/usr/lib/apache2/modules))} spids: [1909] ) ] spids: [1909] ) ] ) ] spids: [16777215 1878] ) ] spids: [16777215 1915] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:bind spids:[1918]) op: Equal rhs: (word.EmptyWord) spids: [1918] ) ] spids: [1918] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(x) (DQ ($ VSub_Name '$local'))} {(Lit_Other '=')} {(xtrue)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:bind spids:[1934]) op: Equal rhs: {(SQ <'127.0.0.1:'>)} spids: [1934] ) ] spids: [1934] ) ] ) (command.SimpleCommand words: [{(echo)} {(SQ <'text/css css'>)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$fqgitdir') (/mime.types))} ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2007 stdin_parts: [ ('ServerName ') (Right_DoubleQuote '"') (git-instaweb) (Right_DoubleQuote '"') ('\n') ('ServerRoot ') (Right_DoubleQuote '"') ($ VSub_Name '$root') (Right_DoubleQuote '"') ('\n') ('DocumentRoot ') (Right_DoubleQuote '"') ($ VSub_Name '$root') (Right_DoubleQuote '"') ('\n') ('ErrorLog ') (Right_DoubleQuote '"') ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') (/error.log) (Right_DoubleQuote '"') ('\n') ('CustomLog ') (Right_DoubleQuote '"') ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') (/access.log) (Right_DoubleQuote '"') (' combined\n') ('PidFile ') (Right_DoubleQuote '"') ($ VSub_Name '$fqgitdir') (/pid) (Right_DoubleQuote '"') ('\n') ('Listen ') ($ VSub_Name '$bind') ($ VSub_Name '$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_Name '$module_path') (/mod_) (${ VSub_Name mod) (.so)} ) ] action: [ (command.SimpleCommand words: [ {(echo)} {(DQ ('LoadModule ') (${ VSub_Name mod) ('_module '))} {(DQ ($ VSub_Name '$module_path') (/mod_) (${ VSub_Name mod) (.so))} ] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) ] ) (command.ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 2040] ) ] spids: [16777215 2078] ) ] spids: [2023 2081] ) spids: [2015 16777215] ) (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_Name '$module_path') (/mod_) (${ VSub_Name mod) (.so)} ) ] action: [ (command.SimpleCommand words: [ {(echo)} {(DQ ('LoadModule ') (${ VSub_Name mod) ('_module '))} {(DQ ($ VSub_Name '$module_path') (/mod_) (${ VSub_Name mod) (.so))} ] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) ] ) ] spids: [16777215 2118] ) ] spids: [16777215 2149] ) ] spids: [2101 2152] ) spids: [2089 16777215] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2174 stdin_parts: [ ('TypesConfig ') (Right_DoubleQuote '"') ($ VSub_Name '$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_Name '$module_path') (/mod_perl.so))}) (command.SimpleCommand words: [ {(sane_grep)} {(SQ <MOD_PERL>)} {(DQ ($ VSub_Name '$root') (/gitweb.cgi))} ] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] ) ] action: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2245 stdin_parts: [ ('LoadModule perl_module ') ($ VSub_Name '$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') ] ) ] ) ] spids: [16777215 2214] ) ] else_action: [ (C {(resolve_full_httpd)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:list_mods spids:[2257]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$full_httpd'))}) (C {(sed)} {(SQ <'s/-f$/-l/'>)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [2258 2272] ) } spids: [2257] ) ] spids: [2257] ) (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children: [ (C {($ VSub_Name '$list_mods')}) (command.SimpleCommand 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_Name '$module_path') (/mod_cgi.so))})] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('LoadModule cgi_module ') ($ VSub_Name '$module_path') (/mod_cgi.so) ) } ] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) ] ) ] spids: [16777215 2307] ) ] else_action: [ (command.AndOr ops: [Op_DPipe] children: [ (command.Pipeline children: [ (C {($ VSub_Name '$list_mods')}) (command.SimpleCommand 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_Name '$module_path') (/mod_cgid.so))}) ] action: [ (command.SimpleCommand words: [ {(echo)} { (DQ ('LoadModule cgid_module ') ($ VSub_Name '$module_path') (/mod_cgid.so) ) } ] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) ] ) ] spids: [16777215 2360] ) ] else_action: [ (C {(echo)} {(DQ ('You have no CGI support!'))}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(2)} ) ] spids: [2380 2395] ) ] ) (command.SimpleCommand words: [{(echo)} {(DQ ('ScriptSock logs/gitweb.sock'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) ] ) ] spids: [2325 2411] ) ] ) (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2433 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') ] ) ] ) ] spids: [2247 2435] ) ] spids: [1864] ) spids: [1859 1863] ) (command.FuncDef name: mongoose_conf body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$conf'))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 2502 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_Name '$root') ('\n') ('ports\t\t') ($ VSub_Name '$port') ('\n') ('index_files\tgitweb.cgi\n') ('#ssl_cert\t') ($ VSub_Name '$fqgitdir') ('/gitweb/ssl_cert.pem\n') ('error_log\t') ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') ('/error.log\n') ('access_log\t') ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') ('/access.log\n') ('\n') ('#cgi setup\n') ('cgi_env\t\tPATH=') ($ VSub_Name '$PATH') (',GIT_DIR=') ($ VSub_Name '$GIT_DIR') (',GIT_EXEC_PATH=') ($ VSub_Name '$GIT_EXEC_PATH') (',GITWEB_CONFIG=') ($ VSub_Name '$GITWEB_CONFIG') ('\n') ('cgi_interp\t') ($ VSub_Name '$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' ) ] ) ] ) ] spids: [2444] ) spids: [2440 2443] ) (command.FuncDef name: plackup_conf body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/gitweb.psgi))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 3219 stdin_parts: [ ('#!') ($ VSub_Name '$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.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app = builder {\n') ('\t# to be able to override ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('SIG{__WARN__} to log build time warnings\n') ('\tuse CGI::Carp; # it sets ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('SIG{__WARN__} itself\n') ('\n') ('\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('logdir = ') (Right_DoubleQuote '"') ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') (Right_DoubleQuote '"') (';\n') ('\topen my ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("access_log_fh, '>>', ") (Right_DoubleQuote '"') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (logdir/access.log) (Right_DoubleQuote '"') ('\n') ('\t\tor die ') (Right_DoubleQuote '"') ("Couldn't open access log '") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("logdir/access.log': ") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('!') (Right_DoubleQuote '"') (';\n') ('\topen my ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("error_log_fh, '>>', ") (Right_DoubleQuote '"') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (logdir/error.log) (Right_DoubleQuote '"') ('\n') ('\t\tor die ') (Right_DoubleQuote '"') ("Couldn't open error log '") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("logdir/error.log': ") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('!') (Right_DoubleQuote '"') (';\n') ('\n') ('\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('access_log_fh->autoflush(1);\n') ('\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('error_log_fh->autoflush(1);\n') ('\n') ('\t# redirect build time warnings to error.log\n') ('\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("SIG{'__WARN__'} = sub {\n") ('\t\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('msg = shift;\n') ('\t\t# timestamp warning like in CGI::Carp::warn\n') ('\t\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('stamp = CGI::Carp::stamp();\n') ('\t\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('msg =~ s/^/') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('stamp/gm;\n') ('\t\tprint ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('error_log_fh ') (word_part.EscapedLiteralPart 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.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('access_log_fh @_; };\n') ('\tenable sub {\n') ('\t\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app = shift;\n') ('\t\tsub {\n') ('\t\t\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('env = shift;\n') ('\t\t\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("env->{'psgi.errors'} = ") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('error_log_fh;\n') ('\t\t\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app->(') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('env);\n') ('\t\t}\n') ('\t};\n') ("\t# gitweb currently doesn't work with ") ($ VSub_Name '$SIG') ("{CHLD} set to 'IGNORE',\n") ("\t# because it uses 'close ") ($ VSub_Name '$fd') (" or die...' on piped filehandle ") ($ VSub_Name '$fh') ('\n') ('\t# (which causes the parent process to wait for child to finish).\n') ('\tenable_if { ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("SIG{'CHLD'} eq 'IGNORE' } sub {\n") ('\t\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app = shift;\n') ('\t\tsub {\n') ('\t\t\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('env = shift;\n') ('\t\t\tlocal ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("SIG{'CHLD'} = 'DEFAULT';\n") ('\t\t\tlocal ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("SIG{'CLD'} = 'DEFAULT';\n") ('\t\t\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app->(') (word_part.EscapedLiteralPart 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.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('! && s!^/gitweb/!! },\n') ('\t\troot => ') (Right_DoubleQuote '"') ($ VSub_Name '$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_Name '$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.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app;\n') ('} else {\n') ('\trequire Plack::Runner;\n') ('\n') ('\tmy ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('runner = Plack::Runner->new();\n') ('\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('runner->parse_options(qw(--env deployment --port ') ($ VSub_Name '$port') ('),\n') ('\t\t\t\t') (Right_DoubleQuote '"') ($ VSub_Name '$local') (Right_DoubleQuote '"') (' ? qw(--host 127.0.0.1) : ());\n') ('\t') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('runner->run(') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('app);\n') ('}\n') ('__END__\n') ] ) ] ) (C {(chmod)} {(a) (Lit_Other '+') (x)} {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/gitweb.psgi))}) (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$conf'))}) ] spids: [2511] ) spids: [2506 2510] ) (command.FuncDef name: gitweb_conf body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(cat)}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/gitweb_config.perl))} ) (redir.HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 3299 stdin_parts: [ ('#!@@PERL@@\n') ('our ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('projectroot = ') (Right_DoubleQuote '"') (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(dirname)} {(DQ ($ VSub_Name '$fqgitdir'))})] ) left_token: <Left_CommandSub '$('> spids: [3273 3279] ) (Right_DoubleQuote '"') (';\n') ('our ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('git_temp = ') (Right_DoubleQuote '"') ($ VSub_Name '$fqgitdir') (/gitweb/tmp) (Right_DoubleQuote '"') (';\n') ('our ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('projects_list = ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('projectroot;\n') ('\n') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("feature{'remote_heads'}{'default'} = [1];\n") ] ) ] ) ] spids: [3253] ) spids: [3249 3252] ) (command.FuncDef name: configure_httpd body: (command.BraceGroup children: [ (command.Case to_match: {(DQ ($ VSub_Name '$httpd'))} arms: [ (case_arm pat_list: [{(Lit_Other '*') (lighttpd) (Lit_Other '*')}] action: [(C {(lighttpd_conf)})] spids: [3319 3322 3328 16777215] ) (case_arm pat_list: [ {(Lit_Other '*') (apache2) (Lit_Other '*')} {(Lit_Other '*') (httpd) (Lit_Other '*')} ] action: [(C {(apache2_conf)})] spids: [3331 3338 3344 16777215] ) (case_arm pat_list: [{(webrick)}] action: [(C {(webrick_conf)})] spids: [3347 3348 3354 16777215] ) (case_arm pat_list: [{(Lit_Other '*') (mongoose) (Lit_Other '*')}] action: [(C {(mongoose_conf)})] spids: [3357 3360 3366 16777215] ) (case_arm pat_list: [{(Lit_Other '*') (plackup) (Lit_Other '*')}] action: [(C {(plackup_conf)})] spids: [3369 3372 3378 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (C {(echo)} {(DQ ('Unknown httpd specified: ') ($ VSub_Name '$httpd'))}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [3381 3382 3398 16777215] ) ] spids: [3310 3316 3401] ) ] spids: [3307] ) spids: [3303 3306] ) (command.Case to_match: {(DQ ($ VSub_Name '$action'))} arms: [ (case_arm pat_list: [{(stop)}] action: [(C {(stop_httpd)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)})] spids: [3414 3415 3426 16777215] ) (case_arm pat_list: [{(start)}] action: [ (C {(start_httpd)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [3428 3429 3440 16777215] ) (case_arm pat_list: [{(restart)}] action: [ (C {(stop_httpd)}) (C {(start_httpd)}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [3442 3443 3457 16777215] ) ] spids: [3406 3412 3459] ) (C {(gitweb_conf)}) (C {(resolve_full_httpd)}) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only'))}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:conf spids:[3477]) op: Equal rhs: {(DQ ($ VSub_Name '$fqgitdir') (/gitweb/) ($ VSub_Name '$httpd_only') (.conf))} spids: [3477] ) ] spids: [3477] ) (C {(configure_httpd)}) (C {(start_httpd)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:url spids:[3491]) op: Equal rhs: {(http) (Lit_Other ':') (//127.0.0.1) (Lit_Other ':') ($ VSub_Name '$port')} spids: [3491] ) ] spids: [3491] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-n)} {(DQ ($ VSub_Name '$browser'))}) terminator: <Op_Semi ';'> ) ] action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(httpd_is_ready)}) (C {(git)} {(web--browse)} {(-b)} {(DQ ($ VSub_Name '$browser'))} {($ VSub_Name '$url')}) (C {(echo)} {($ VSub_Name '$url')}) ] ) ] spids: [16777215 3510] ) ] else_action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(httpd_is_ready)}) (C {(git)} {(web--browse)} {(-c)} {(DQ (instaweb.browser))} {($ VSub_Name '$url')}) (C {(echo)} {($ VSub_Name '$url')}) ] ) ] spids: [3535 3560] ) ] )