(CommandList children: [ (C {(umask)} {(022)}) (Case to_match: {($ VSub_Number '$0')} arms: [ (case_arm pat_list: [{(Lit_Other '*') (/) (Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:srcdir) op: Equal rhs: { (BracedVarSub token: <VSub_Number 0> suffix_op: (StringUnary op_id:VOp1_Percent arg_word:{(Lit_Slash /) ('*')}) spids: [94 99] ) } spids: [93] ) ] spids: [93] ) ] spids: [85 91 101 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:srcdir) op:Equal rhs:{(.)} spids:[109])] spids: [109] ) ] spids: [103 107 112 16777215] ) ] spids: [79 83 114] ) (AndOr ops: [Op_DPipe] children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:srcdir) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr ops: [Op_DAmp] children: [(C {(cd)} {(DQ ($ VSub_Name '$srcdir'))}) (C {(pwd)} {(-P)})] ) ] ) left_token: <Left_CommandSub '$('> spids: [117 129] ) } spids: [116] ) ] spids: [116] ) (ControlFlow token:<ControlFlow_Exit exit>) ] ) (AndOr ops: [Op_DPipe] children: [(C {(cd)} {(DQ ($ VSub_Name '$srcdir'))}) (ControlFlow token:<ControlFlow_Exit exit>)] ) (FuncDef name: usage body: (BraceGroup children: [ (C {(echo)} {(DQ ('usage: ') ($ VSub_Number '$0') (' [ -n ] [ -f ] [ -d INSTALLROOT ]'))}) (C {(echo)} {(DQ ('\t-n: non-interactive operation'))}) (C {(echo)} {(DQ ('\t-f: delete */modernish directories even if files left'))}) (C {(echo)} {(DQ ('\t-d: specify root directory of modernish installation to uninstall'))}) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [150] ) redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] spids: [146 149] ) (C {(unset)} {(-v)} {(opt_n)} {(opt_f)} {(installroot)}) (WhileUntil keyword: <KW_While while> cond: [(Sentence child:(C {(getopts)} {(SQ <'nfd:'>)} {(opt)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Case to_match: {($ VSub_Name '$opt')} arms: [ (case_arm pat_list: [{(EscapedLiteralPart token:<Lit_EscapedChar '\\?'>)}] action: [(C {(usage)})] spids: [227 231 235 16777215] ) (case_arm pat_list: [{(n)}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_n) op:Equal rhs:{(SQ )} spids:[244])] spids: [244] ) ] spids: [238 242 248 16777215] ) (case_arm pat_list: [{(f)}] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:opt_f) op:Equal rhs:{(SQ )} spids:[260])] spids: [260] ) ] spids: [254 258 264 16777215] ) (case_arm pat_list: [{(d)}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:installroot) op: Equal rhs: {($ VSub_Name '$OPTARG')} spids: [276] ) ] spids: [276] ) ] spids: [270 274 279 16777215] ) ] spids: [220 224 285] ) ] spids: [217 287] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [291 298] ) } ) (Case to_match: {($ VSub_Pound '$#')} arms: [ (case_arm pat_list: [{(Lit_Other '[') (KW_Bang '!') (0) (Lit_Other ']') (Lit_Other '*')}] action: [(C {(usage)})] spids: [306 314 318 16777215] ) ] spids: [300 304 320] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:MSH_SHELL) op:Equal rhs:{(SQ )} spids:[338])] spids: [338] ) (If arms: [ (if_arm cond: [ (Sentence child: (SimpleCommand words: [{(command)} {(-v)} {(modernish)}] redirects: [ (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(read)} {(junk)} {(junk)} {(MSH_SHELL)} {(junk)}] redirects: [ (Redir op: <Redir_Less '<'> fd: 16777215 arg_word: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(command)} {(-v)} {(modernish)})]) left_token: <Left_CommandSub '$('> spids: [382 388] ) ) } ) ] more_env: [(env_pair name:IFS val:{(DQ ('#!') ($ VSub_Name '$IFS'))} spids:[364])] ) ] spids: [16777215 357] ) ] spids: [16777215 391] ) (ForEach iter_name: MSH_SHELL iter_words: [ {(DQ ($ VSub_Name '$MSH_SHELL'))} {(/bin/sh)} {(dash)} {(yash)} {(bash)} {(ksh)} {(ksh93)} {(mksh)} {(oksh)} {(pdksh)} {(zsh)} {(zsh4)} {(zsh5)} {(ash)} ] do_arg_iter: F body: (DoGroup children: [ (AndOr ops: [Op_DPipe] children: [ (SimpleCommand words: [{(command)} {(-v)} {(DQ ($ VSub_Name '$MSH_SHELL'))}] redirects: [ (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)}) (Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)}) ] ) (ControlFlow token:<ControlFlow_Continue continue>) ] ) (Case to_match: { (CommandSubPart command_list: (CommandList children: [(C {(DQ ($ VSub_Name '$MSH_SHELL'))} {(-c)} {(SQ <'echo "$PPID"'>)})] ) left_token: <Left_CommandSub '$('> spids: [454 464] ) } arms: [ (case_arm pat_list: [ {(SQ )} {(Lit_Other '*') (Lit_Other '[') (KW_Bang '!') (0123456789) (Lit_Other ']') (Lit_Other '*') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MSH_SHELL) op: Equal rhs: {(SQ )} spids: [486] ) ] spids: [486] ) (ControlFlow token:<ControlFlow_Continue continue>) ] spids: [469 483 493 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MSH_SHELL) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(command)} {(-v)} {(DQ ($ VSub_Name '$MSH_SHELL'))})] ) left_token: <Left_CommandSub '$('> spids: [503 511] ) } spids: [502] ) ] spids: [502] ) (ControlFlow token:<ControlFlow_Break break>) ] spids: [496 500 516 16777215] ) ] spids: [452 466 519] ) ] spids: [430 521] ) spids: [398 428] ) (Case to_match: {($ VSub_Name '$MSH_SHELL')} arms: [ (case_arm pat_list: [{(SQ )}] action: [ (SimpleCommand words: [ {(echo)} { (DQ ("Fatal: can't find any shell with ") (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ('PPID!') ) } ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(125)}) ] spids: [529 534 552 16777215] ) ] spids: [523 527 554] ) (If arms: [ (if_arm cond: [ (Sentence child: (Pipeline children: [ (BraceGroup children: [ (Sentence child: (Subshell child: (C {(eval)} {(DQ ('. bin/modernish'))}) spids: [584 590] ) terminator: <Op_Amp '&'> ) (Sentence child: (C {(wait)} {(DQ ($ VSub_Bang '$!'))}) terminator: <Op_Semi ';'> ) ] spids: [582] ) ] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)}) (C {(echo)} { (DQ ("The shell executing this script can't run modernish. Try running uninstall.sh")) } ) (C {(echo)} {(DQ ('with a more fully POSIX-compliant shell, for instance: dash uninstall.sh'))} ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)}) ] spids: [16777215 604] ) ] redirects: [(Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] spids: [16777215 628] ) (C {(.)} {(bin/modernish)}) (C {(use)} {(safe)} {(-w)} {(BUG_APPENDC)} {(-w)} {(BUG_UPP)}) (C {(use)} {(var/arith/cmp)}) (C {(use)} {(loop/select)} {(-w)} {(BUG_SELECTEOF)} {(-w)} {(BUG_SELECTRPL)}) (C {(use)} {(sys/base/which)}) (C {(use)} {(sys/dir)}) (C {(use)} {(var/string)}) (C {(use)} {(sys/user/id)} {(-f)}) (C {(harden)} {(-p)} {(-t)} {(rm)}) (C {(harden)} {(-p)} {(-t)} {(rmdir)}) (C {(harden)} {(-p)} {(ls)}) ] )