(CommandList children: [ (C {(set)} {(-e)}) (FuncDef name: usage body: (BraceGroup children: [(C {(echo)} {(DQ ("Usage: -o file"))}) (C {(exit)} {(1)})] spids: [13] ) spids: [9 12] ) (AndOr children: [ (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(Lit_Other "=")} {(0)} {(Lit_Other "]")}) (C {(usage)}) ] op_id: Op_DAmp ) (While cond: [(C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-gt)} {(0)} {(Lit_Other "]")})] body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:flag) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [60] ) ] spids: [60] ) (Case to_match: {(DQ ($ VSub_Name "$flag"))} arms: [ (case_arm pat_list: [{(-o)}] action: [ (AndOr children: [ (C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-eq)} {(1)} {(Lit_Other "]")}) (C {(usage)}) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:out) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [94] ) ] spids: [94] ) (C {(mkdir)} {(-p)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(dirname)} {($ VSub_Number "$2")})] ) left_token: <Left_CommandSub "$("> spids: [105 109] ) ) } ) (C {(shift)}) ] spids: [75 76 116 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (C {(echo)} {(DQ ("Unknown option ") ($ VSub_Number "$1"))}) (C {(exit)} {(1)}) ] spids: [119 120 -1 136] ) ] spids: [66 72 136] ) (C {(shift)}) ] spids: [57 141] ) ) (AndOr children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$out"))} {(Lit_Other "]")}) (C {(usage)}) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:package) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(basename)} {(DQ ($ VSub_Name "$out"))})]) left_token: <Left_CommandSub "$("> spids: [160 166] ) } spids: [159] ) ] spids: [159] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:dir) op:Equal rhs:{(DQ (/src))} spids:[169])] spids: [169] ) (C {(tar)} {(xf)} {(-)} {(-C)} {($ VSub_Name "$dir")}) (Subshell child: (CommandList children: [ (C {(cd)} {($ VSub_Name "$dir")}) (C {(opam)} {(config)} {(exec)} {(--)} {(mirage)} {(configure)} {(-o)} {($ VSub_Name "$out")} {(-t)} {(unix)} ) (C {(opam)} {(config)} {(exec)} {(--)} {(make)} {(depend)}) (C {(opam)} {(config)} {(exec)} {(--)} {(make)}) (C {(mv)} { (CommandSubPart command_list: (CommandList children:[(C {(readlink)} {($ VSub_Name "$out")})]) left_token: <Left_CommandSub "$("> spids: [244 248] ) } {($ VSub_Name "$out")} ) ] ) redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(/src/logs)} spids:[254]) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[258]) ] spids: [189 252] ) (AndOr children: [(C {(cd)} {($ VSub_Name "$dir")}) (C {(tar)} {(-cf)} {(-)} {($ VSub_Name "$out")})] op_id: Op_DAmp ) (C {(exit)} {(0)}) ] )