(CommandList children: [ (FuncDef name: die body: (BraceGroup children: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(Redir op_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[13])] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [8] ) spids: [4 7] ) (FuncDef name: xmkdir body: (BraceGroup children: [ (While cond: [ (Sentence child: (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] body: (DoGroup children: [ (AndOr ops: [Op_DPipe Op_DPipe] children: [ (C {(Lit_Other '[')} {(-d)} {(DQ ($ VSub_Number '$1'))} {(Lit_Other ']')}) (C {(mkdir)} {(DQ ($ VSub_Number '$1'))}) (C {(die)} {(DQ ('Unable to mkdir ') ($ VSub_Number '$1'))}) ] ) (C {(shift)}) ] spids: [48 82] ) ) ] spids: [32] ) spids: [28 31] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:R) op:Equal rhs:{(DQ ($ VSub_Number '$1'))} spids:[87])] spids: [87] ) (AndOr ops: [Op_DAmp] children: [ (C {(Lit_Other '[')} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-u)})]) left_token: <Left_CommandSub '$('> spids: [96 100] ) ) } {(-eq)} {(0)} {(Lit_Other ']')} ) (C {(die)} {(DQ ('This script should not be run as root, what if it does rm -rf /?'))}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$R'))} {(Lit_Other ']')}) (C {(die)} {(DQ ('usage: prepare-chroot.sh <root>'))}) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-x)} {(git)} {(Lit_Other ']')}) (C {(die)} {(DQ ("This script needs to be executed at git source code's top directory"))}) ] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-x)} {(/bin/busybox)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:BB) op:Equal rhs:{(/bin/busybox)} spids:[165])] spids: [165] ) ] spids: [16777215 162] ) (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-x)} {(/usr/bin/busybox)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:BB) op: Equal rhs: {(/usr/bin/busybox)} spids: [182] ) ] spids: [182] ) ] spids: [168 179] ) ] else_action: [(C {(die)} {(DQ ('You need busybox'))})] spids: [185 194] ) (C {(xmkdir)} {(DQ ($ VSub_Name '$R'))} {(DQ ($ VSub_Name '$R') (/bin))} {(DQ ($ VSub_Name '$R') (/etc))} {(DQ ($ VSub_Name '$R') (/lib))} {(DQ ($ VSub_Name '$R') (/dev))} ) (C {(touch)} {(DQ ($ VSub_Name '$R') (/dev/null))}) (SimpleCommand words: [{(echo)} {(DQ ('root:x:0:0:root:/:/bin/sh'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$R') (/etc/passwd))} spids: [236] ) ] ) (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-nu)})]) left_token: <Left_CommandSub '$('> spids: [246 250] ) (':x:') (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-u)})]) left_token: <Left_CommandSub '$('> spids: [252 256] ) (':') (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-g)})]) left_token: <Left_CommandSub '$('> spids: [258 262] ) ('::') (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [264 266] ) ('/t:/bin/sh') ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {(DQ ($ VSub_Name '$R') (/etc/passwd))} spids: [270] ) ] ) (SimpleCommand words: [{(echo)} {(DQ ('root::0:root'))}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(DQ ($ VSub_Name '$R') (/etc/group))} spids: [283] ) ] ) (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-ng)})]) left_token: <Left_CommandSub '$('> spids: [293 297] ) ('::') (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-g)})]) left_token: <Left_CommandSub '$('> spids: [299 303] ) (':') (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-nu)})]) left_token: <Left_CommandSub '$('> spids: [305 309] ) ) } ] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {(DQ ($ VSub_Name '$R') (/etc/group))} spids: [312] ) ] ) (AndOr ops: [Op_DPipe] children: [ (C {(Lit_Other '[')} {(-x)} {(DQ ($ VSub_Name '$R') ($ VSub_Name '$BB'))} {(Lit_Other ']')}) (C {(cp)} {($ VSub_Name '$BB')} {(DQ ($ VSub_Name '$R') (/bin/busybox))}) ] ) (ForEach iter_name: cmd iter_words: [ {(sh)} {(su)} {(ls)} {(expr)} {(tr)} {(basename)} {(rm)} {(mkdir)} {(mv)} {(id)} {(uname)} {(dirname)} {(cat)} {(true)} {(sed)} {(diff)} ] do_arg_iter: F body: (DoGroup children: [ (C {(ln)} {(-f)} {(-s)} {(/bin/busybox)} {(DQ ($ VSub_Name '$R') (/bin/) ($ VSub_Name '$cmd'))}) ] spids: [381 398] ) spids: [347 379] ) (C {(mkdir)} {(-p)} { (DQ ($ VSub_Name '$R') (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [407 409] ) ) } ) (C {(rsync)} {(--exclude-from)} {(t/t1509/excludes)} {(-Ha)} {(.)} { (DQ ($ VSub_Name '$R') (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [424 426] ) ) } ) (SimpleCommand words: [{(sed)} {(SQ <'s|^PERL_PATH=.*|PERL_PATH=/bin/true|'>)} {(GIT-BUILD-OPTIONS)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: { (DQ ($ VSub_Name '$R') (CommandSubPart command_list: (CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> spids: [447 449] ) (/GIT-BUILD-OPTIONS) ) } spids: [443] ) ] ) (ForEach iter_name: cmd iter_words: [{(git)} {($ VSub_Name '$BB')}] do_arg_iter: F body: (DoGroup children: [ (Pipeline children: [ (C {(ldd)} {($ VSub_Name '$cmd')}) (C {(grep)} {(SQ </>)}) (C {(sed)} {(SQ <'s,.*\\s\\(/[^ ]*\\).*,\\1,'>)}) (While cond: [(Sentence child:(C {(read)} {(i)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (C {(mkdir)} {(-p)} { (DQ ($ VSub_Name '$R') (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {($ VSub_Name '$i')})] ) left_token: <Left_CommandSub '$('> spids: [505 509] ) ) } ) (C {(cp)} {(DQ ($ VSub_Name '$i'))} {(DQ ($ VSub_Name '$R') (/) ($ VSub_Name '$i'))} ) ] spids: [496 526] ) ) ] negated: F ) ] spids: [463 528] ) spids: [458 462] ) (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('All is set up in ') ($ VSub_Name '$R') (', execute t1509 with the following commands:\n') ('\n') ('sudo chroot ') ($ VSub_Name '$R') (' /bin/su - ') (CommandSubPart command_list: (CommandList children:[(C {(id)} {(-nu)})]) left_token: <Left_CommandSub '$('> spids: [542 546] ) ('\n') ('IKNOWWHATIAMDOING=YES ./t1509-root-worktree.sh -v -i\n') ('\n') ('When you are done, simply delete ') ($ VSub_Name '$R') (' to clean up\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [532] ) ] ) ] )