(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:currentVersion) op:Equal rhs:{(DQ (1.11.1))} spids:[6])] spids: [6] ) (Assignment keyword: Assign_Declare flags: ["'-a'"] pairs: [ (assign_pair lhs: (LhsName name:tools) op: Equal rhs: { (ArrayLiteralPart words: [ {(currency)} {(stocks)} {(weather)} {(crypt)} {(movies)} {(taste)} {(short)} {(geo)} {(cheat)} {(ytview)} {(cloudup)} {(qrify)} ] ) } spids: [15] ) ] spids: [11] ) (FuncDef name: askInstall body: (BraceGroup children: [ (C {(echo)} {(-n)} {(DQ ("Do you wish to install ") ($ VSub_Number "$1") (" [Y/n]: "))}) (C {(read)} {(-r)} {(answer)}) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalOr left: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name "$answer"))} right: {(DQ (Y))} ) right: (BoolBinary op_id: BoolBinary_GlobDEqual left: {(DQ ($ VSub_Name "$answer"))} right: {(DQ (y))} ) ) ) terminator: <Op_Semi ";"> ) ] action: [ (AndOr children: [ (C {(cd)} {($ VSub_Number "$1")}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DPipe ) (C {(echo)} {(-n)} {(DQ ("Installing ") ($ VSub_Number "$1") (": "))}) (C {(chmod)} {(a) (Lit_Other "+") (x)} {($ VSub_Number "$1")}) (AndOr children: [ (SimpleCommand words: [{(cp)} {($ VSub_Number "$1")} {(/usr/local/bin)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [137] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [141] ) ] ) (BraceGroup children: [ (Sentence child: (C {(echo)} {(DQ (Failure))}) terminator: <Op_Semi ";"> ) (Sentence child: (C {(echo)} {(DQ ("Error copying file, try running install script as sudo"))} ) terminator: <Op_Semi ";"> ) (Sentence child: (C {(exit)} {(1)}) terminator: <Op_Semi ";"> ) ] spids: [146] ) ] op_id: Op_DPipe ) (C {(echo)} {(DQ (Success))}) (AndOr children: [ (C {(cd)} {(..)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [-1 97] ) ] spids: [-1 188] ) ] spids: [47] ) spids: [43 46] ) (FuncDef name: updateTool body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_f child: {(/usr/local/bin/) ($ VSub_Number "$1")} ) ) terminator: <Op_Semi ";"> ) ] action: [ (AndOr children: [ (C {(cd)} {($ VSub_Number "$1")}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DPipe ) (C {(echo)} {(-n)} {(DQ ("Installing ") ($ VSub_Number "$1") (": "))}) (C {(chmod)} {(a) (Lit_Other "+") (x)} {($ VSub_Number "$1")}) (AndOr children: [ (SimpleCommand words: [{(cp)} {($ VSub_Number "$1")} {(/usr/local/bin)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [251] ) (Redir op_id: Redir_GreatAnd fd: 2 arg_word: {(1)} spids: [255] ) ] ) (BraceGroup children: [ (Sentence child: (C {(echo)} {(DQ (Failure))}) terminator: <Op_Semi ";"> ) (Sentence child: (C {(echo)} {(DQ ("Error copying file, try running install script as sudo"))} ) terminator: <Op_Semi ";"> ) (Sentence child: (C {(exit)} {(1)}) terminator: <Op_Semi ";"> ) ] spids: [260] ) ] op_id: Op_DPipe ) (C {(echo)} {(DQ (Success))}) (AndOr children: [ (C {(cd)} {(..)}) (ControlFlow token: <ControlFlow_Return return> arg_word: {(1)} ) ] op_id: Op_DPipe ) ] spids: [-1 211] ) ] spids: [-1 302] ) ] spids: [197] ) spids: [193 196] ) (FuncDef name: singleInstall body: (BraceGroup children: [ (AndOr children: [(C {(cd)} {($ VSub_Number "$1")}) (C {(exit)} {(1)})] op_id: Op_DPipe ) (C {(echo)} {(-n)} {(DQ ("Installing ") ($ VSub_Number "$1") (": "))}) (C {(chmod)} {(a) (Lit_Other "+") (x)} {($ VSub_Number "$1")}) (AndOr children: [ (SimpleCommand words: [{(cp)} {($ VSub_Number "$1")} {(/usr/local/bin)}] redirects: [ (Redir op_id: Redir_Great fd: -1 arg_word: {(/dev/null)} spids: [351] ) (Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[355]) ] ) (BraceGroup children: [ (Sentence child: (C {(echo)} {(DQ (Failure))}) terminator: <Op_Semi ";"> ) (Sentence child: (C {(echo)} {(DQ ("Error copying file, try running install script as sudo"))}) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [360] ) ] op_id: Op_DPipe ) (C {(echo)} {(DQ (Success))}) (AndOr children:[(C {(cd)} {(..)})(C {(exit)} {(1)})] op_id:Op_DPipe) ] spids: [311] ) spids: [307 310] ) (FuncDef name: copyManpage body: (BraceGroup children: [ (AndOr children: [ (SimpleCommand words: [{(cp)} {(bash-snippets.1)} {(/usr/local/man/man1)}] redirects: [(Redir op_id:Redir_GreatAnd fd:2 arg_word:{(1)} spids:[417])] ) (BraceGroup children: [ (Sentence child: (C {(echo)} {(DQ (Failure))}) terminator: <Op_Semi ";"> ) (Sentence child: (C {(echo)} {(DQ ("Error copying file, try running install script as sudo"))}) terminator: <Op_Semi ";"> ) (Sentence child:(C {(exit)} {(1)}) terminator:<Op_Semi ";">) ] spids: [422] ) ] op_id: Op_DPipe ) ] spids: [408] ) spids: [404 407] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id:BoolBinary_GlobDEqual left:{($ VSub_Pound "$#")} right:{(0)}) ) terminator: <Op_Semi ";"> ) ] action: [ (ForEach iter_name: tool iter_words: [ { (DQ (BracedVarSub token: <VSub_Name tools> bracket_op: (WholeArray op_id:Lit_At) spids: [471 476] ) ) } ] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [(C {(askInstall)} {($ VSub_Name "$tool")}) (C {(exit)} {(1)})] op_id: Op_DPipe ) ] spids: [480 494] ) spids: [469 -1] ) (AndOr children:[(C {(copyManpage)})(C {(exit)} {(1)})] op_id:Op_DPipe) ] spids: [-1 461] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Number "$1")} right: {(DQ (update))} ) ) terminator: <Op_Semi ";"> ) ] action: [ (C {(echo)} {(DQ ("Updating scripts..."))}) (ForEach iter_name: tool iter_words: [ { (DQ (BracedVarSub token: <VSub_Name tools> bracket_op: (WholeArray op_id:Lit_At) spids: [537 542] ) ) } ] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [(C {(updateTool)} {($ VSub_Name "$tool")}) (C {(exit)} {(1)})] op_id: Op_DPipe ) ] spids: [546 560] ) spids: [535 -1] ) (AndOr children:[(C {(copyManpage)})(C {(exit)} {(1)})] op_id:Op_DPipe) ] spids: [505 520] ) (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobDEqual left: {($ VSub_Number "$1")} right: {(DQ (all))} ) ) terminator: <Op_Semi ";"> ) ] action: [ (ForEach iter_name: tool iter_words: [ { (DQ (BracedVarSub token: <VSub_Name tools> bracket_op: (WholeArray op_id:Lit_At) spids: [595 600] ) ) } ] do_arg_iter: False body: (DoGroup children: [ (AndOr children: [(C {(singleInstall)} {($ VSub_Name "$tool")}) (C {(exit)} {(1)})] op_id: Op_DPipe ) ] spids: [604 618] ) spids: [593 -1] ) (AndOr children:[(C {(copyManpage)})(C {(exit)} {(1)})] op_id:Op_DPipe) ] spids: [571 585] ) ] else_action: [ (AndOr children: [(C {(singleInstall)} {($ VSub_Number "$1")}) (C {(exit)} {(1)})] op_id: Op_DPipe ) (AndOr children:[(C {(copyManpage)})(C {(exit)} {(1)})] op_id:Op_DPipe) ] spids: [629 651] ) (C {(echo)} {(-n)} {(DQ ("( \u2022_\u2022)"))}) (C {(sleep)} {(.75)}) (C {(echo)} {(-n)} {(-e)} { (DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) ("( \u2022_\u2022)>\u2310\u25a0-\u25a0") ) } ) (C {(sleep)} {(.75)}) (C {(echo)} {(-n)} {(-e)} {(DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) (" "))} ) (C {(echo)} {(-e)} {(DQ (EscapedLiteralPart token:<Lit_EscapedChar "\\r">) ("(\u2310\u25a0_\u25a0)"))} ) (C {(sleep)} {(.5)}) (C {(echo)} {(DQ ("Bash Snippets version ") ($ VSub_Name "$currentVersion"))}) (C {(echo)} {(DQ ("https://github.com/alexanderepstein/Bash-Snippets"))}) ] )