(command.CommandList children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:num_files) op:Equal rhs:{(10)})] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:site) op:Equal rhs:{(DQ (www.pixelbeat.org))})] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:author) op: Equal rhs: {(DQ ('P@draigBrady.com (P\xc3\xa1draig Brady)'))} ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:suggested_update_freq) op:Equal rhs:{(1440)})] ) (C {(Lit_Other ':')} { (braced_var_sub token: <VSub_Name TITLE> suffix_op: (suffix_op.Unary op_id:VTest_Equals arg_word:{($ VSub_DollarName '$site')}) ) } ) (C {(Lit_Other ':')} { (braced_var_sub token: <VSub_Name DESCRIPTION> suffix_op: (suffix_op.Unary op_id: VTest_Equals arg_word: {(DQ ('latest from ') ($ VSub_DollarName '$site'))} ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:include_re) op: Equal rhs: {(SQ <'(^|/)[.].+|(^|/)[^.]+$|[.](c|cpp|py|sh|rc|tips|fortune|html)$'>)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exclude_re) op: Equal rhs: { (SQ < '(\\.git/|priv/|tmp/|.htaccess|xvpics|timeline\\.html|modified\\.html|head\\.html|header\\.html|footer\\.html|footer-home\\.html|adds\\.html|last\\.html|fslint/(NEWS\\.html|md5sum)|README)' > ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:default_files) op: Equal rhs: {(DQ ('index.html index.shtml index.php'))} ) ] ) (command.ForEach iter_name: file iter_words: [{($ VSub_DollarName '$default_files')}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:replace_default_files) op: Equal rhs: { (DQ ($ VSub_DollarName '$replace_default_files') ('; s/') (Lit_Other '\\') ('(.*') (Lit_Other '\\') (')') ($ VSub_DollarName '$file') (Lit_Other '$') (/) (Lit_Other '\\') ('1/;t') ) } ) ] ) ] ) ) (C {(echo)} { (SQ <'<?xml version="1.0" encoding="utf-8"?>\n'> <'<?xml-stylesheet type="text/css" href="rss2.css" ?>\n'> <'\n'> <'<rss version="2.0">\n'> <'<channel>'> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:time) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children:[(C {(date)} {(--rfc-2822)})]) ) } ) ] ) (C {(echo)} { (DQ ('\n') ('<title>') ($ VSub_DollarName '$TITLE') ('</title>\n') ('<ttl>') ($ VSub_DollarName '$suggested_update_freq') ('</ttl>\n') ('<link>http://') ($ VSub_DollarName '$site') (/) ($ VSub_Number '$1') ('</link>\n') ('<generator>http://www.pixelbeat.org/scripts/bashfeed</generator>\n') ('<description>') ($ VSub_DollarName '$DESCRIPTION') ('</description>\n') ('<managingEditor>') ($ VSub_DollarName '$author') ('</managingEditor>\n') ('<lastBuildDate>') ($ VSub_DollarName '$time') ('</lastBuildDate>\n') ('<language>') (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ VSub_DollarName '$LANG')}) (C {(sed)} {(SQ <'s/\\(..\\)_.*/\\1/'>)}) ] negated: F ) ] ) ) ('</language>\n') ) } ) (command.ShFunction name: xml_unescaped body: (command.BraceGroup children: [ (command.Sentence child: (command.Pipeline children: [ (C {(sed)} {(SQ <'s/&//g; s/&[lg]t;//g; s/"//g'>)}) (C {(grep)} {(-q)} {(DQ ('[&<>]'))}) ] negated: F ) terminator: <Op_Semi ';'> ) ] ) ) (command.AndOr ops: [Op_DAmp] children: [ (command.Pipeline children: [ (C {(find)} {($ VSub_Number '$1')} {(-type)} {(f)} {(-printf)} {(DQ ('%p') (Lit_Other '\\') ('t%T@') (Lit_Other '\\') (n))} ) (C {(sed)} {(SQ <'s/^\\.\\///'>)}) (C {(sort)} {(-k2) (Lit_Comma ',') (2nr)}) (C {(cut)} {(-f1)}) (C {(grep)} {(-E)} {(DQ ($ VSub_DollarName '$include_re'))}) (C {(grep)} {(-Ev)} {(DQ ($ VSub_DollarName '$exclude_re'))}) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(read)} {(file)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(head)} {(DQ ($ VSub_DollarName '$file'))}) (C {(grep)} {(-Fiq)} {(SQ <'<!--Exclude from bashfeed-->'>)}) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ($ VSub_DollarName '$file'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:i) op: Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Arith_Plus left: (arith_expr.VarRef token:<Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {($ VSub_DollarName '$i')} {(-eq)} {($ VSub_DollarName '$num_files')} {(Lit_RBracket ']')} ) (command.ControlFlow token: <ControlFlow_Break break> ) ] ) ] ) ] ) ] ) ) (command.WhileUntil keyword: <KW_While while> cond: [(command.Sentence child:(C {(read)} {(file)}) terminator:<Op_Semi ';'>)] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pubDate) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (C {(date)} {(--reference) (Lit_Equals '=') (DQ ($ VSub_DollarName '$file')) } {(--rfc-2822)} ) ] ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force_update) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (C {(date)} {(--reference) (Lit_Equals '=') (DQ ($ VSub_DollarName '$file')) } {(DQ ('+%s'))} ) ] ) ) } ) ] ) (command.Sentence child: (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:title) op:Equal rhs:{(DQ )})] ) terminator: <Op_Semi ';'> ) (command.Sentence child: (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:keywords) op:Equal rhs:{(DQ )})] ) terminator: <Op_Semi ';'> ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:description) op:Equal rhs:{(DQ )})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$file'))}) (C {(grep)} {(-Eq)} {(SQ <'\\.(html|shtml|php)$'>)}) ] negated: F ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:title) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Simple words: [ {(sed)} {(-n)} { (SQ <'s/.*<title>\\(.*\\)<\\/title>.*/\\1/ip;T;q'> ) } ] redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ ($ VSub_DollarName '$file'))} ) ] ) ] ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:keywords) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Simple words: [ {(sed)} {(-n)} { (SQ < 's/.*<META.*NAME="keywords".*CONTENT="\\(.*\\)".*/\\1/ip;T;q' > ) } ] redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ ($ VSub_DollarName '$file'))} ) ] ) ] ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:description) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Simple words: [ {(sed)} {(-n)} { (SQ < 's/.*<META.*NAME="description".*CONTENT="\\(.*\\)".*/\\1/ip;T;q' > ) } ] redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ ($ VSub_DollarName '$file'))} ) ] ) ] ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:page_author) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Simple words: [ {(sed)} {(-n)} { (SQ < 's/.*<META.*NAME="author".*CONTENT="\\(.*\\)".*/\\1/ip;T;q' > ) } ] redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(DQ ($ VSub_DollarName '$file'))} ) ] ) ] ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:extracted_text) op: Equal rhs: { (DQ ($ VSub_DollarName '$title') (' ') ($ VSub_DollarName '$keywords') (' ') ($ VSub_DollarName '$description') (Lit_Other '$') (' ') ($ VSub_DollarName '$page_author') ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$extracted_text'))}) (C {(xml_unescaped)}) ] negated: F ) terminator: <Op_Semi ';'> ) ] action: [ (command.Simple words: [ {(echo)} { (DQ ('Error: HTML metadata in ') ($ VSub_DollarName '$file') (' will not produce a valid XML feed') ) } ] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] ) ] ) ] ) (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(-x)} {(DQ ($ VSub_DollarName '$file'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:description) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (C {(sed)} {(-n)} {(SQ <'3s/# \\(.*\\)/\\1/p'>)} {(DQ ($ VSub_DollarName '$file'))} ) ] ) ) } ) ] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:file) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_DollarName '$file'))}) (C {(sed)} {(DQ ($ VSub_DollarName '$replace_default_files'))}) ] negated: F ) ] ) ) } ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_LBracket '[')} {(-z)} {(DQ ($ VSub_DollarName '$title'))} {(Lit_RBracket ']')} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:title) op: Equal rhs: {(DQ ($ VSub_DollarName '$file'))} ) ] ) ] ) (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:tags) op:Equal rhs:{(DQ )})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_DollarName '$keywords'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.ForEach iter_name: keyword iter_words: [{($ VSub_DollarName '$keywords')}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tags) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (C {(echo)} {(-ne)} { (DQ ($ VSub_DollarName '$tags') ('<category>') ($ VSub_DollarName '$keyword') ('</category>') (Lit_Other '\\') ('n ') ) } ) ] ) ) } ) ] ) ] ) ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$page_author'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_LBracket '[')} {(DQ ($ VSub_DollarName '$page_author'))} {(Lit_Equals '=')} {(DQ ($ VSub_DollarName '$author'))} {(Lit_RBracket ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:page_author) op: Equal rhs: {(DQ )} ) ] ) ] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:page_author) op: Equal rhs: { (command_sub left_token: <Left_Backtick '`'> command_list: (command.CommandList children: [ (C {(echo)} {(-ne)} { (DQ ('<author>') ($ VSub_DollarName '$page_author') ('</author>') (Lit_Other '\\') ('n ') ) } ) ] ) ) } ) ] ) ] ) ] ) ] ) (C {(echo)} { (DQ ('\n') ('<item>\n') (' <title>') ($ VSub_DollarName '$title') ('</title>\n') (' <guid>http://') ($ VSub_DollarName '$site') (/) ($ VSub_DollarName '$file') ('</guid>\n') (' <pubDate>') ($ VSub_DollarName '$pubDate') ('</pubDate>\n') (' <link>http://') ($ VSub_DollarName '$site') (/) ($ VSub_DollarName '$file') ('#') ($ VSub_DollarName '$force_update') ('</link>\n') (' ') ($ VSub_DollarName '$page_author') ($ VSub_DollarName '$tags') ('<description><![CDATA[') ($ VSub_DollarName '$description') ('<!--') ($ VSub_DollarName '$force_update') ('-->]]></description>\n') ('</item>\n') ) } ) ] ) ) ] negated: F ) (C {(echo)} {(SQ <'</channel>\n'> <'</rss>'>)}) ] ) ] )