(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:currentVersion) op: assign_op.Equal rhs: {(DQ <1.11.1>)} spids: [20] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:configuredClient) op: assign_op.Equal rhs: {(DQ )} spids: [25] ) ] ) (command.ShFunction name: getConfiguredClient body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<command>} {<-v>} {<curl>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:configuredClient) op: assign_op.Equal rhs: {(DQ <curl>)} spids: [56] ) ] ) ] spids: [40 53] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<command>} {<-v>} {<wget>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:configuredClient) op: assign_op.Equal rhs: {(DQ <wget>)} spids: [78] ) ] ) ] spids: [62 75] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [{<command>} {<-v>} {<fetch>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:configuredClient) op: assign_op.Equal rhs: {(DQ <fetch>)} spids: [100] ) ] ) ] spids: [84 97] ) ] else_action: [ (C {<echo>} {(DQ <'Error: This tool reqires either curl, wget, or fetch to be installed.'>)} ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ] ) ) (command.ShFunction name: httpGet body: (BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$configuredClient'))} arms: [ (case_arm pat_list: [{<curl>}] action: [(C {<curl>} {<-A>} {<curl>} {<-s>} {(DQ ($ Id.VSub_At '$@'))})] spids: [146 147 160 -1] ) (case_arm pat_list: [{<wget>}] action: [(C {<wget>} {<-qO->} {(DQ ($ Id.VSub_At '$@'))})] spids: [163 164 173 -1] ) (case_arm pat_list: [{<fetch>}] action: [(C {<fetch>} {<-o>} {(DQ <...>)})] spids: [176 177 186 -1] ) ] ) ] ) ) (command.ShFunction name: usage body: (BraceGroup children: [ (C {<echo>} {(DQ <Geo>)}) (C {<echo>} { (DQ < 'Description: Provides quick access for wan, lan, router, dns, mac, and ip geolocation data' > ) } ) (C {<echo>} {(DQ <'Usage: geo [flag]'>)}) (C {<echo>} {(DQ <' -w Returns WAN IP'>)}) (C {<echo>} {(DQ <' -l Returns LAN IP(s)'>)}) (C {<echo>} {(DQ <' -r Returns Router IP'>)}) (C {<echo>} {(DQ <' -d Returns DNS Nameserver'>)}) (C {<echo>} {(DQ <' -m Returns MAC address for interface. Ex. eth0'>)}) (C {<echo>} {(DQ <' -g Returns Current IP Geodata'>)}) (C {<echo>} {(DQ <'Examples:'>)}) (C {<echo>} {(DQ <' geo -g'>)}) (C {<echo>} {(DQ <' geo -wlrdgm eth0'>)}) (C {<echo>} {(DQ <'Custom Geo Output =>'>)}) (C {<echo>} {(DQ <'[all] [query] [city] [region] [country] [zip] [isp]'>)}) (C {<echo>} {(DQ <'Example: geo -a 8.8.8.8 -o city,zip,isp'>)}) (C {<echo>} {(DQ <' -o [options] Returns Specific Geodata'>)}) (C {<echo>} {(DQ <' -a [address] For specific ip in -s'>)}) (C {<echo>} {(DQ <' -v Returns Version'>)}) (C {<echo>} {(DQ <' -h Returns Help Screen'>)}) (C {<echo>} {(DQ <' -u Updates Bash-Snippets'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] ) ) (command.ShFunction name: version body: (BraceGroup children: [ (command.Sentence child: (C {<echo>} {(DQ <'Version '> ($ Id.VSub_DollarName '$currentVersion'))}) terminator: <Id.Op_Semi _> ) ] ) ) (command.ShFunction name: wan_search body: (BraceGroup children: [ (C {<dig>} {<Id.Lit_Other '+'> <short>} {<myip.opendns.com>} {<Id.Lit_Splice '@resolver1'> <.opendns.com>} ) ] ) ) (command.ShFunction name: lan_search body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Darwin>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<ifconfig>}) (C {<grep>} {<-Eo>} {(SQ <'inet (addr:)?([0-9]*\\.){3}[0-9]*'>)}) (C {<grep>} {<-Eo>} {(SQ <'([0-9]*\\.){3}[0-9]*'>)}) (C {<grep>} {<-v>} {(SQ <127.0.0.1>)}) ] negated: F ) ] spids: [402 421] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>} {<-s>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<ip>} {<addr>} {<show>}) (C {<grep>} {<-Eo>} {(SQ <'inet (addr:)?([0-9]*\\.){3}[0-9]*'>)}) (C {<grep>} {<-Eo>} {(SQ <'([0-9]*\\.){3}[0-9]*'>)}) (C {<grep>} {<-v>} {(SQ <127.0.0.1>)}) ] negated: F ) ] spids: [457 478] ) ] else_action: [ (C {<echo>} {(DQ <'OS not supported'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] ) ) (command.ShFunction name: router_search body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Darwin>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<netstat>} {<-rn>}) (C {<grep>} {<default>}) (C {<head>} {<-1>}) (C {<awk>} {(SQ <'{print$2}'>)}) ] negated: F ) ] spids: [548 567] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>} {<-s>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<ip>} {<route>}) (C {<grep>} {<Id.Lit_Other '^'> <default> (SQ <'\\s'>) <via>}) (C {<head>} {<-1>}) (C {<awk>} {(SQ <'{print$3}'>)}) ] negated: F ) ] spids: [595 616] ) ] else_action: [ (C {<echo>} {(DQ <'OS not supported'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] ) ) (command.ShFunction name: dns_search body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Darwin>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<grep>} {<-i>} {<nameserver>} {<'/etc/resolv.conf'>}) (C {<head>} {<-n1>}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f2>}) ] negated: F ) ] spids: [679 698] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>} {<-s>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<cat>} {<'/etc/resolv.conf'>}) (C {<grep>} {<-i>} {<Id.Lit_Other '^'> <nameserver>}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f2>}) ] negated: F ) ] spids: [725 746] ) ] else_action: [ (C {<echo>} {(DQ <'OS not supported'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] ) ) (command.ShFunction name: mac_search body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Darwin>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<ifconfig>} {(DQ ($ Id.VSub_DollarName '$MAC'))}) (C {<grep>} {<-o>} {<-E>} {(SQ <'([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'>)}) ] negated: F ) ] spids: [805 824] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>} {<-s>}) ) ) } {<Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Pipeline children: [ (C {<ip>} {<addr>} {<show>} {(DQ ($ Id.VSub_DollarName '$MAC'))}) (C {<grep>} {<-o>} {<-E>} {(SQ <'([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'>)}) (C {<grep>} {<-v>} {<ff> <Id.Lit_Colon ':'>}) ] negated: F ) ] spids: [846 867] ) ] else_action: [ (C {<echo>} {(DQ <'OS not supported'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] ) ) (command.ShFunction name: geodata_search body: (BraceGroup children: [ (C {<httpGet>} {(DQ <'http://ip-api.com/line/?fields=query,city,region,country,zip,isp'>)}) ] ) ) (command.ShFunction name: specific_geo body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTIONS'))} {<Id.Lit_Equals '='>} {(DQ <all>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<httpGet>} { (DQ <'http://ip-api.com/line/'> (${ Id.VSub_Name ADDRESS) <'?fields=query,city,region,country,zip,isp'> ) } ) ] spids: [951 968] ) ] else_action: [ (C {<httpGet>} { (DQ <'http://ip-api.com/line/'> (${ Id.VSub_Name ADDRESS) <'?fields='> (${ Id.VSub_Name OPTIONS) ) } ) ] ) ] ) ) (command.ShFunction name: update body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:repositoryName) op: assign_op.Equal rhs: {(DQ <Bash-Snippets>)} spids: [1024] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:githubUserName) op: assign_op.Equal rhs: {(DQ <alexanderepstein>)} spids: [1033] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nameOfInstallFile) op: assign_op.Equal rhs: {(DQ <install.sh>)} spids: [1042] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:latestVersion) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<httpGet>} {<https> <Id.Lit_Colon ':'> <'//api.github.com/repos/'> ($ Id.VSub_DollarName '$githubUserName') <'/'> ($ Id.VSub_DollarName '$repositoryName') <'/tags'> } ) (C {<grep>} {<-Eo>} {(SQ <'"name":.*?[^\\\\]",'>)}) (C {<head>} {<-1>}) (C {<grep>} {<-Eo>} {(DQ <'[0-9.]+'>)}) ] negated: F ) ) } spids: [1051] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$currentVersion')} right: {(DQ )} ) right: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$repositoryName')} right: {(DQ )} ) right: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$githubUserName')} right: {(DQ )} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$nameOfInstallFile')} right: {(DQ )} ) ) ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} {(DQ <'Error: update utility has not been configured correctly.'>)} ] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [1095 1135] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_DollarName '$latestVersion')} right: {(DQ )} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'Error: no active internet connection'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [1153 1166] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: {(DQ ($ Id.VSub_DollarName '$latestVersion'))} right: {(DQ ($ Id.VSub_DollarName '$currentVersion'))} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ <'Version '> ($ Id.VSub_DollarName '$latestVersion') <' available'>)} ) (C {<echo>} {<-n>} { (DQ <'Do you wish to update '> ($ Id.VSub_DollarName '$repositoryName') <' [Y/n]: '> ) } ) (C {<read>} {<-r>} {<answer>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.LogicalOr left: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$answer'))} right: {(DQ <Y>)} ) right: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {(DQ ($ Id.VSub_DollarName '$answer'))} right: {(DQ <y>)} ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<cd>} {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>)}) (BraceGroup children: [ (command.Sentence child: (C {<echo>} {(SQ <'Update Failed'>)}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Unary op_id: Id.BoolUnary_d child: { (word_part.TildeSub token: <Id.Lit_TildeLike '~'> ) <'/'> ($ Id.VSub_DollarName '$repositoryName') } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<rm>} {<-r>} {<-f>} {($ Id.VSub_DollarName '$repositoryName')} ) (BraceGroup children: [ (command.Sentence child: (C {<echo>} { (DQ < 'Permissions Error: try running the update as sudo' > ) } ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) terminator: <Id.Op_Semi _> ) ] ) ] ) terminator: <Id.Op_Semi _> ) ] spids: [1291 1304] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<git>} {<clone>} { (DQ <'https://github.com/'> ($ Id.VSub_DollarName '$githubUserName') <'/'> ($ Id.VSub_DollarName '$repositoryName') ) } ) (BraceGroup children: [ (command.Sentence child: (C {<echo>} {(DQ <'Couldn\'t download latest version'>)}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<cd>} {($ Id.VSub_DollarName '$repositoryName')}) (BraceGroup children: [ (command.Sentence child: (C {<echo>} {(SQ <'Update Failed'>)}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) terminator: <Id.Op_Semi _> ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe Id.Op_DPipe] children: [ (command.Simple words: [ {<git>} {<checkout>} {(DQ <v> ($ Id.VSub_DollarName '$latestVersion'))} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [ {<git>} {<checkout>} {(DQ ($ Id.VSub_DollarName '$latestVersion'))} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<echo>} { (DQ < 'Couldn\'t git checkout to stable release, updating to latest commit.' > ) } ) ] ) (C {<chmod>} {<a> <Id.Lit_Other '+'> <x>} {<install.sh>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<'./'> ($ Id.VSub_DollarName '$nameOfInstallFile')} {(DQ <update>)} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) (C {<cd>} {<..>}) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<rm>} {<-r>} {<-f>} {($ Id.VSub_DollarName '$repositoryName')}) (BraceGroup children: [ (command.Sentence child: (C {<echo>} { (DQ < 'Permissions Error: update succesfull but cannot delete temp files located at ~/' > ($ Id.VSub_DollarName '$repositoryName') <' delete this directory with sudo'> ) } ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) terminator: <Id.Op_Semi _> ) ] ) ] ) ] spids: [1234 1263] ) ] else_action: [ (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) ] spids: [1187 1204] ) ] else_action: [ (C {<echo>} { (DQ ($ Id.VSub_DollarName '$repositoryName') <' is already the latest version'> ) } ) ] ) ] ) ] ) ) (command.ShFunction name: checkInternet body: (BraceGroup children: [ (command.Pipeline children: [ (C {<echo>} { (DQ <'GET http://google.com HTTP/1.0'> <Id.Lit_BadBackslash '\\'> <n> <Id.Lit_BadBackslash '\\'> <n> ) } ) (command.Simple words: [{<nc>} {<google.com>} {<80>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})] spids: [1557 1570] ) ] else_action: [ (command.Simple words: [{<echo>} {(DQ <'Error: no active internet connection'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:optspec) op: assign_op.Equal rhs: {(DQ <'uwlrdm:go:a:vh*:'>)} spids: [1611] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(C {<getopts>} {(DQ ($ Id.VSub_DollarName '$optspec'))} {<optchar>})] ) body: (command.DoGroup children: [ (command.Case to_match: {(DQ (${ Id.VSub_Name optchar))} arms: [ (case_arm pat_list: [{<w>}] action: [(C {<wan_search>})] spids: [1640 1641 1645 -1] ) (case_arm pat_list: [{<l>}] action: [(C {<lan_search>})] spids: [1648 1649 1653 -1] ) (case_arm pat_list: [{<r>}] action: [(C {<router_search>})] spids: [1656 1657 1661 -1] ) (case_arm pat_list: [{<d>}] action: [(C {<dns_search>})] spids: [1664 1665 1669 -1] ) (case_arm pat_list: [{<m>}] action: [ (command.Simple words: [{<mac_search>}] more_env: [ (env_pair name: MAC val: {($ Id.VSub_DollarName '$OPTARG')} spids: [1675] ) ] do_fork: T ) ] spids: [1672 1673 1679 -1] ) (case_arm pat_list: [{<g>}] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {<getConfiguredClient>}) (C {<checkInternet>}) (C {<geodata_search>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) ] spids: [1682 1683 1701 -1] ) (case_arm pat_list: [{<a>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ADDRESS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTARG')} spids: [1707] ) ] ) ] spids: [1704 1705 1710 -1] ) (case_arm pat_list: [{<o>}] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {<getConfiguredClient>}) (C {<checkInternet>}) (command.Simple words: [{<specific_geo>}] more_env: [ (env_pair name: OPTIONS val: {($ Id.VSub_DollarName '$OPTARG')} spids: [1724] ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) ] spids: [1713 1714 1735 -1] ) (case_arm pat_list: [{<v>}] action: [(C {<version>})] spids: [1738 1739 1743 -1] ) (case_arm pat_list: [{<h>}] action: [(C {<usage>})] spids: [1746 1747 1751 -1] ) (case_arm pat_list: [{<u>}] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {<getConfiguredClient>}) (C {<checkInternet>}) (C {<update>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ) ] spids: [1754 1755 1773 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<usage>})] spids: [1776 1777 1781 -1] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<usage>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [1792 1805] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$1')} right: {(DQ <update>)} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {<getConfiguredClient>}) (C {<checkInternet>}) (C {<update>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ] spids: [1815 1829] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$1')} right: {(DQ <help>)} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<usage>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [1848 1862] ) ] ) ] )