(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:gdrive) op: Equal rhs: {(DQ ($ VSub_Name '$HOME') ('/Google Drive'))} spids: [10] ) ] spids: [10] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:gsync) op: Equal rhs: {(DQ ($ VSub_Name '$gdrive') (/gsync))} spids: [16] ) ] spids: [16] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:gapp) op: Equal rhs: {(DQ ('Google Drive.app'))} spids: [22] ) ] spids: [22] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (SimpleCommand words: [ {(echo)} { (DQ ('Usage: ') (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$0')})] ) left_token: <Left_CommandSub '$('> spids: [49 53] ) (' [file or files to sync]') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) terminator: <Op_Semi ';'> ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 42] ) ] spids: [16777215 66] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(-z)} { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ps)} {(-ef)}) (C {(grep)} {(DQ ($ VSub_Name '$gapp'))}) (C {(grep)} {(-v)} {(grep)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [79 99] ) ) } {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(echo)} {(DQ ('Starting up Google Drive daemon...'))}) (C {(open)} {(-a)} {(DQ ($ VSub_Name '$gapp'))}) ] spids: [16777215 106] ) ] spids: [16777215 124] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-d)} {(DQ ($ VSub_Name '$gsync'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(mkdir)} {(DQ ($ VSub_Name '$gsync'))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_QMark '$?')} {(-ne)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children: [(C {(basename)} {($ VSub_Number '$0')})] ) left_token: <Left_CommandSub '$('> spids: [176 180] ) (': Failed trying to mkdir ') ($ VSub_Name '$gsync') ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 170] ) ] spids: [16777215 194] ) ] spids: [16777215 146] ) ] spids: [16777215 196] ) (ForEach iter_name: name do_arg_iter: T body: (DoGroup children: [ (C {(echo)} {(DQ ('Copying file ') ($ VSub_Name '$name') (' to your Google Drive'))}) (C {(cp)} {(-a)} {(DQ ($ VSub_Name '$name'))} {(DQ ($ VSub_Name '$gdrive') (/gsync/))}) ] spids: [204 229] ) spids: [16777215 16777215] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )