(command.CommandList children: [ (command.FuncDef name: noversion body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LOGRUS spids:[139]) op: Equal rhs: { (SQ < 's/-*\\(\\([0-9\\.]\\)*\\([_-]rc\\)*\\(-pre\\)*\\([0-9][a-zA-Z]\\)*\\)*\\(\\.tar\\(\\..z2*\\)*\\)$' > ) } spids: [139] ) ] spids: [139] ) (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$2'))} {(Lit_Other ']')}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LOGRUS spids:[157]) op: Equal rhs: {(DQ ($ VSub_Name '$LOGRUS') (//))} spids: [157] ) ] spids: [157] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:LOGRUS spids:[165]) op: Equal rhs: { (DQ ($ VSub_Name '$LOGRUS') (/) ($ VSub_Number '$2') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\\\'> ) (6/) ) } spids: [165] ) ] spids: [165] ) ] ) (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Number '$1'))}) (C {(sed)} {(-e)} {(DQ ($ VSub_Name '$LOGRUS'))}) ] negated: F ) ] spids: [136] ) spids: [132 135] ) (command.FuncDef name: gather_patches body: (command.BraceGroup children: [ (command.Pipeline children: [ (command.SimpleCommand words: [ {(ls)} {(DQ ($ VSub_Name '$PATCHDIR') (/) (${ VSub_Name PACKAGE)) (-) (Lit_Other '*') (.patch) } ] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (C {(sort)}) (command.WhileUntil keyword: <KW_While while> cond: [(C {(read)} {(i)})] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')}) ] action: [(C {(echo)} {(DQ ($ VSub_Name '$i'))})] spids: [16777215 248] ) ] spids: [16777215 258] ) ] spids: [232 261] ) ) ] negated: F ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$MY_PATCH_DIR'))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(-d)} {(DQ (${ VSub_Name MY_PATCH_DIR) (/) (${ VSub_Name PACKAGE))} {(Lit_Other ']')} ) ] ) ] action: [ (command.ForEach iter_name: i iter_words: [ {(DQ (${ VSub_Name MY_PATCH_DIR) (/) (${ VSub_Name PACKAGE) (/)) (Lit_Other '*') (.patch) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')} ) ] action: [(C {(echo)} {(DQ ($ VSub_Name '$i'))})] spids: [16777215 341] ) ] spids: [16777215 351] ) ] spids: [325 354] ) spids: [310 16777215] ) ] spids: [16777215 302] ) ] spids: [16777215 357] ) ] spids: [199] ) spids: [195 198] ) (command.FuncDef name: patch_package body: (command.BraceGroup children: [ (command.Pipeline children: [ (C {(gather_patches)}) (command.WhileUntil keyword: <KW_While while> cond: [(C {(read)} {(i)})] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')}) ] action: [ (C {(echo)} {(DQ ('Applying ') ($ VSub_Name '$i'))}) (command.AndOr ops: [Op_DPipe] children: [ (command.Subshell child: (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(cd)} { (DQ (${ VSub_Name SRCTREE) (/) (${ VSub_Name PACKAGE)) } ) (C {(patch)} {(-p1)} {(-i)} {(DQ ($ VSub_Name '$i'))}) (command.SimpleCommand words: [{(sha1file)} {(DQ ($ VSub_Name '$i'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$SHA1FILE'))} ) ] ) ] ) spids: [410 450] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$ALLOW_PATCH_FAILURE'))} {(Lit_Other ']')} ) ] action: [(C {(dienow)})] spids: [16777215 468] ) ] spids: [16777215 474] ) ] ) ] spids: [16777215 399] ) ] spids: [16777215 477] ) ] spids: [383 480] ) ) ] negated: F ) ] spids: [369] ) spids: [365 368] ) (command.FuncDef name: find_package_tarball body: (command.BraceGroup children: [ (command.Pipeline children: [ (command.SimpleCommand words: [ {(ls)} {(-tc)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Number '$1') (-)) (Lit_Other '*') (.tar) (Lit_Other '*') } ] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (command.WhileUntil keyword: <KW_While while> cond: [(C {(read)} {(i)})] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(noversion)} { (DQ (word_part.BracedVarSub token: <VSub_Name i> suffix_op: (suffix_op.PatSub pat: {('*') (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\/'> ) } replace: (word.EmptyWord) replace_mode: Undefined_Tok spids: [553] ) spids: [551 557] ) ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [547 559] ) ) } {(Lit_Other '=') (Lit_Other '=')} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')} ) ] action: [ (C {(echo)} {(DQ ($ VSub_Name '$i'))}) (command.ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 572] ) ] spids: [16777215 585] ) ] spids: [539 588] ) ) ] negated: F ) ] spids: [493] ) spids: [489 492] ) (command.FuncDef name: package_cache body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SNAPFROM spids:[600]) op: Equal rhs: {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Number '$1'))} spids: [600] ) ] spids: [600] ) (command.AndOr ops: [Op_DAmp] children: [ (command.Subshell child: (command.AndOr ops: [Op_DPipe] children: [ (C {(is_in_list)} {(DQ ($ VSub_Number '$1'))} {(DQ ($ VSub_Name '$IGNORE_REPOS'))} ) (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$SNAPFROM'))} {(Lit_Other ']')} ) ] ) spids: [608 632] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SNAPFROM spids:[637]) op: Equal rhs: {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Number '$1'))} spids: [637] ) ] spids: [637] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$SNAPFROM'))} {(Lit_Other ']')} ) ] action: [ (command.SimpleCommand words: [ {(echo)} {(DQ ($ VSub_Number '$1') (' not found. Did you run download.sh?'))} ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (C {(dienow)}) ] spids: [16777215 661] ) ] spids: [16777215 678] ) (C {(echo)} {(DQ ($ VSub_Name '$SNAPFROM'))}) ] spids: [597] ) spids: [593 596] ) (command.FuncDef name: extract_package body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe] children: [(C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$SRCTREE'))}) (C {(dienow)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PACKAGE spids:[727]) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [727] ) ] spids: [727] ) (C {(announce)} {(DQ ($ VSub_Name '$PACKAGE'))}) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (command.Pipeline children: [(C {(is_in_list)} {(DQ (PACKAGE))} {(DQ ($ VSub_Name '$IGNORE_REPOS'))})] negated: T ) (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$PACKAGE'))} {(Lit_Other ']')} ) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:FILENAME spids:[781]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(find_package_tarball)} {(DQ ($ VSub_Name '$PACKAGE'))})] ) left_token: <Left_CommandSub '$('> spids: [783 789] ) ) } spids: [781] ) ] spids: [781] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DECOMPRESS spids:[793]) op: Equal rhs: {(DQ )} spids: [793] ) ] spids: [793] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FILENAME'))} {(KW_Bang '!') (Lit_Other '=')} { (DQ (word_part.BracedVarSub token: <VSub_Name FILENAME> suffix_op: (suffix_op.PatSub pat: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\.'>) (tar) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\.'> ) (bz2) } replace: (word.EmptyWord) replace_mode: Lit_Percent spids: [810] ) spids: [808 817] ) ) } {(Lit_Other ']')} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DECOMPRESS spids:[824]) op: Equal rhs: {(DQ (j))} spids: [824] ) ] spids: [824] ) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$FILENAME'))} {(KW_Bang '!') (Lit_Other '=')} { (DQ (word_part.BracedVarSub token: <VSub_Name FILENAME> suffix_op: (suffix_op.PatSub pat: {(word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\.'>) (tar) (word_part.EscapedLiteralPart token: <Lit_EscapedChar '\\.'> ) (gz) } replace: (word.EmptyWord) replace_mode: Lit_Percent spids: [842] ) spids: [840 849] ) ) } {(Lit_Other ']')} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:DECOMPRESS spids:[856]) op: Equal rhs: {(DQ (z))} spids: [856] ) ] spids: [856] ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SHA1NAME spids:[872]) op: Equal rhs: {(DQ (sha1-for-source.txt))} spids: [872] ) ] spids: [872] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SHA1FILE spids:[878]) op: Equal rhs: { (DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE') (/) ($ VSub_Name '$SHA1NAME') ) } spids: [878] ) ] spids: [878] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$FILENAME'))} {(Lit_Other ']')}) ] action: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-e)} {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE'))} {(Lit_Other ']')} ) ] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ('No tarball for ') ($ VSub_Name '$PACKAGE'))}] redirects: [ (redir.Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (C {(dienow)}) ] spids: [16777215 921] ) ] spids: [16777215 938] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-e)} {(DQ ($ VSub_Name '$SHA1FILE'))} {(Lit_Other ']')} ) (C {(patch_package)}) ] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [16777215 901] ) ] spids: [16777215 968] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SHA1TAR spids:[981]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(sha1file)} {(DQ ($ VSub_Name '$FILENAME'))})] ) left_token: <Left_CommandSub '$('> spids: [983 989] ) ) } spids: [981] ) ] spids: [981] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SHALIST spids:[993]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [{(cat)} {(DQ ($ VSub_Name '$SHA1FILE'))}] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [994 1004] ) } spids: [993] ) ] spids: [993] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$SHALIST'))} {(Lit_Other ']')} ) ] action: [ (command.ForEach iter_name: i iter_words: [ {(DQ ($ VSub_Name '$SHA1TAR'))} { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(sha1file)} { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(gather_patches)})] ) left_token: <Left_CommandSub '$('> spids: [1038 1040] ) } ) ] ) left_token: <Left_CommandSub '$('> spids: [1035 1041] ) } ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-z)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$SHALIST'))}) (C {(grep)} {(DQ ($ VSub_Name '$i'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1058 1072] ) ) } {(Lit_Other ']')} ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SHALIST spids:[1081]) op: Equal rhs: {(missing)} spids: [1081] ) ] spids: [1081] ) (command.ControlFlow token: <ControlFlow_Break break> ) ] spids: [16777215 1078] ) ] spids: [16777215 1088] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SHALIST spids:[1095]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$SHALIST'))}) (C {(sed)} {(DQ (s/) ($ VSub_Name '$i') (//))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1097 1114] ) ) } spids: [1095] ) ] spids: [1095] ) ] spids: [1044 1118] ) spids: [1030 16777215] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SHALIST'))} {(Lit_Other ']')}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] spids: [16777215 1022] ) ] spids: [16777215 1142] ) (C {(echo)} {(-n)} {(DQ ("Extracting '") ($ VSub_Name '$PACKAGE') ("'"))}) (command.Subshell child: (command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:UNIQUE spids:[1165]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(readlink)} {(/proc/self)})] ) left_token: <Left_CommandSub '$('> spids: [1166 1170] ) } spids: [1165] ) ] spids: [1165] ) (C {(trap)} {(SQ <'rm -rf "$BUILD/temp-'>) ($ VSub_Name '$UNIQUE') (SQ <'"'>)} {(EXIT)} ) (command.SimpleCommand words: [{(rm)} {(-rf)} {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE'))}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE'))} {(DQ ($ VSub_Name '$SRCTREE'))} ) (C {(dienow)}) ] ) (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(tar)} {(-xv) (${ VSub_Name DECOMPRESS)} {(-f)} {(DQ ($ VSub_Name '$FILENAME'))} {(-C)} {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE'))} ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:TARDIR spids:[1254]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(readlink)} {(-f)} { (DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE') ) (/) (Lit_Other '*') } ) ] ) left_token: <Left_CommandSub '$('> spids: [1256 1268] ) ) } spids: [1254] ) ] spids: [1254] ) (C {(touch)} {(DQ ($ VSub_Name '$TARDIR') (/) ($ VSub_Name '$SHA1NAME'))} ) ] ) ] spids: [1220] ) (C {(dotprogress)}) ] negated: F ) (command.AndOr ops: [Op_DAmp Op_DAmp] children: [ (C {(Lit_Other '[')} {(-e)} {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE')) (/) (Lit_Other '*') (/) (DQ ($ VSub_Name '$SHA1NAME')) } {(Lit_Other ']')} ) (C {(mv)} {(DQ ($ VSub_Name '$BUILD') (/temp-) ($ VSub_Name '$UNIQUE') (/)) (Lit_Other '*') } {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$PACKAGE'))} ) (command.SimpleCommand words: [{(echo)} {(DQ ($ VSub_Name '$SHA1TAR'))}] redirects: [ (redir.Redir op: <Redir_DGreat '>>'> fd: 16777215 arg_word: {(DQ ($ VSub_Name '$SHA1FILE'))} ) ] ) ] ) ] ) spids: [1162 1344] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) (C {(dienow)}) ] ) (C {(patch_package)}) ] spids: [705] ) spids: [701 704] ) (command.FuncDef name: confirm_checksum body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SUM spids:[1383]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [ {(sha1file)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))} ] redirects: [ (redir.Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1385 1396] ) ) } spids: [1383] ) ] spids: [1383] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DPipe Op_DAmp] children: [ (C {(Lit_Other '[')} {(x) (DQ ($ VSub_Name '$SUM'))} {(Lit_Other '=') (Lit_Other '=')} {(x) (DQ ($ VSub_Name '$SHA1'))} {(Lit_Other ']')} ) (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SHA1'))} {(Lit_Other ']')}) (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))} {(Lit_Other ']')} ) ] ) ] action: [ (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$SHA1'))} {(Lit_Other ']')}) ] action: [ (C {(echo)} { (DQ ('No SHA1 for ') ($ VSub_Name '$FILENAME') (' (') ($ VSub_Name '$SUM') (')') ) } ) ] spids: [16777215 1462] ) ] else_action: [(C {(echo)} {(DQ ('Confirmed ') ($ VSub_Name '$FILENAME'))})] spids: [1476 1487] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$EXTRACT_ALL'))} {(Lit_Other ']')}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) (C {(extract_package)} {(DQ ($ VSub_Name '$BASENAME'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {($ VSub_QMark '$?')} ) ] spids: [16777215 1446] ) ] spids: [16777215 1525] ) (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [1380] ) spids: [1376 1379] ) (command.FuncDef name: download_from body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(confirm_checksum)}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(wget)} {(-t)} {(2)} {(-T)} {(20)} {(-O)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))} {(DQ ($ VSub_Number '$1'))} ) (command.Subshell child: (command.CommandList children: [ (command.Sentence child: (C {(rm)} {(-f)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))}) terminator: <Op_Semi ';'> ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(2)} ) ] ) spids: [1630 1645] ) ] ) (C {(touch)} {(-c)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$FILENAME'))}) (C {(confirm_checksum)}) ] spids: [1565] ) spids: [1561 1564] ) (command.FuncDef name: download body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:FILENAME spids:[1676]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$URL'))}) (C {(sed)} {(SQ <'s .*/ '>)}) ] negated: F ) ] ) left_token: <Left_Backtick '`'> spids: [1677 1691] ) } spids: [1676] ) ] spids: [1676] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-z)} {(DQ ($ VSub_Name '$RENAME'))} {(Lit_Other ']')}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:FILENAME spids:[1706]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name '$FILENAME'))}) (C {(sed)} {(-r)} {(DQ ($ VSub_Name '$RENAME'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [1708 1724] ) ) } spids: [1706] ) ] spids: [1706] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(-z)} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.SimpleCommand words: [{(sha1sum)}] redirects: [ (redir.Redir op: <Redir_Less '<'> fd: 16777215 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_CommandSub '$('> spids: [1736 1742] ) ) } {(Lit_Other ']')} ) ] action: [ (command.SimpleCommand words: [{(echo)} {(DQ ('Error: please install sha1sum'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [16777215 1748] ) ] spids: [16777215 1766] ) (C {(echo)} {(-ne)} {(DQ ('checking ') ($ VSub_Name '$FILENAME') (Lit_Other '\\') (r))}) (command.SimpleCommand words: [{(touch)} {(-c)} {(DQ ($ VSub_Name '$SRCDIR')) (/) (DQ ($ VSub_Name '$FILENAME'))}] redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:BASENAME spids:[1809]) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(noversion)} {(DQ ($ VSub_Name '$FILENAME'))})] ) left_token: <Left_CommandSub '$('> spids: [1811 1817] ) ) } spids: [1809] ) ] spids: [1809] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (command.Pipeline children: [ (C {(is_in_list)} {(DQ ($ VSub_Name '$BASENAME'))} {(DQ ($ VSub_Name '$IGNORE_REPOS'))} ) ] negated: T ) (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$BASENAME'))} {(Lit_Other ']')} ) ] ) ] action: [ (C {(echo)} {(DQ ('Using ') ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$BASENAME'))}) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$EXTRACT_ALL'))} {(Lit_Other '=') (Lit_Other '=')} {(force)} {(Lit_Other ']')} ) ] action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$BASENAME'))} ) (C {(cp)} {(-a)} {(DQ ($ VSub_Name '$SRCDIR') (/) ($ VSub_Name '$BASENAME'))} {(DQ ($ VSub_Name '$SRCTREE') (/) ($ VSub_Name '$BASENAME'))} ) (C {(dienow)}) ] ) ] spids: [16777215 1879] ) ] spids: [16777215 1916] ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] spids: [16777215 1850] ) ] spids: [16777215 1925] ) (command.If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$PREFERRED_MIRROR'))} {(Lit_Other ']')} ) ] action: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(download_from)} {(DQ ($ VSub_Name '$PREFERRED_MIRROR') (/) ($ VSub_Name '$FILENAME'))} ) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] spids: [16777215 1949] ) ] spids: [16777215 1967] ) (command.AndOr ops: [Op_DAmp] children: [ (C {(download_from)} {(DQ ($ VSub_Name '$URL'))}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(0)}) ] ) (command.ForEach iter_name: i iter_words: [{($ VSub_Name '$MIRROR_LIST')}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(download_from)} {(DQ ($ VSub_Name '$i') (/) ($ VSub_Name '$FILENAME'))}) (command.ControlFlow token: <ControlFlow_Return return> arg_word: {(0)} ) ] ) ] spids: [2002 2020] ) spids: [1998 16777215] ) (C {(echo)} {(DQ ('Could not download ') ($ VSub_Name '$FILENAME'))}) (C {(echo)} {(-en)} {(DQ (Lit_Other '\\') ('e[0m'))}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] spids: [1673] ) spids: [1669 1672] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:START_TIME spids:[2058]) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)})] ) left_token: <Left_Backtick '`'> spids: [2059 2065] ) } spids: [2058] ) ] spids: [2058] ) (command.FuncDef name: cleanup_oldfiles body: (command.BraceGroup children: [ (C {(wait)}) (command.ForEach iter_name: i iter_words: [{(DQ (${ VSub_Name SRCDIR)) (/) (Lit_Other '*')}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} {(-f)} {(DQ ($ VSub_Name '$i'))} {(Lit_Other ']')}) (C {(Lit_Other '[')} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(date)} {(Lit_Other '+') (Lit_Other '%') (s)} {(-r)} {(DQ ($ VSub_Name '$i'))} ) ] ) left_token: <Left_CommandSub '$('> spids: [2119 2131] ) ) } {(-lt)} {(DQ (${ VSub_Name START_TIME))} {(Lit_Other ']')} ) ] ) ] action: [ (C {(echo)} {(Removing)} {(old)} {(file)} {(DQ ($ VSub_Name '$i'))}) (C {(rm)} {(-rf)} {(DQ ($ VSub_Name '$i'))}) ] spids: [16777215 2145] ) ] spids: [16777215 2170] ) ] spids: [2099 2173] ) spids: [2089 16777215] ) ] spids: [2072] ) spids: [2068 2071] ) ] )