(CommandList children: [ (If arms: [ (if_arm cond: [(C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-ne)} {(1)} {(Lit_Other "]")})] action: [ (SimpleCommand words: [{(echo)} {(DQ ("usage: ") ($ VSub_Number "$0") (" CONTROL_IMAGE"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[45])] ) (C {(exit)} {(1)}) ] spids: [-1 34] ) ] spids: [-1 53] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-f)} {(DQ ($ VSub_Number "$1"))} {(Lit_Other "]")}) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Filesystem image ") ($ VSub_Number "$1") (" missing"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[81])] ) (C {(exit)} {(1)}) ] spids: [-1 70] ) ] spids: [-1 89] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:HDCFILE) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [(C {(readlink)} {(-f)} {($ VSub_Number "$1")})] ) left_token: <Left_CommandSub "$("> spids: [93 99] ) ) } spids: [91] ) ] spids: [91] ) (C {(INCLUDE)} {(unique-port.sh)}) (If arms: [ (if_arm cond: [(C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$FTP_SERVER"))} {(Lit_Other "]")})] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FTP_SERVER) op: Equal rhs: {(127.0.0.1)} spids: [127] ) ] spids: [127] ) ] spids: [-1 124] ) (if_arm cond: [(C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$FTP_PORT"))} {(Lit_Other "]")})] action: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:FTP_PORT) op:Equal rhs:{(21)} spids:[145])] spids: [145] ) ] spids: [130 142] ) ] spids: [-1 148] ) (If arms: [ (if_arm cond: [(C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$FTP_PORT"))} {(Lit_Other "]")})] action: [ (If arms: [ (if_arm cond: [ (C {(Lit_Other "[")} {(-z)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(which)} {(toybox)})]) left_token: <Left_CommandSub "$("> spids: [173 177] ) ) } {(Lit_Other "]")} ) ] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Warning: can't find toybox, no ftp daemon launched."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[192])] ) ] spids: [-1 183] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FTP_PORT) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(unique_port)})]) left_token: <Left_CommandSub "$("> spids: [200 202] ) } spids: [199] ) ] spids: [199] ) (C {(echo)} {(Lit_Other "=") (Lit_Other "=") (Lit_Other "=")} {(launching)} {(FTP)} {(daemon)} {(on)} {(port)} {(DQ ($ VSub_Name "$FTP_PORT"))} ) (C {(mkdir)} {(-p)} {(upload)}) (Sentence child: (C {(toybox)} {(nc)} {(-s)} {(127.0.0.1)} {(-p)} {($ VSub_Name "$FTP_PORT")} {(-L)} {(busybox)} {(ftpd)} {(-w)} {(upload)} ) terminator: <Op_Amp "&"> ) (C {(trap)} { (DQ ("kill ") (CommandSubPart command_list: (CommandList children:[(C {(jobs)} {(-p)})]) left_token: <Left_CommandSub "$("> spids: [277 281] ) ) } {(EXIT)} ) (C {(disown)} { (CommandSubPart command_list: (CommandList children:[(C {(jobs)} {(-p)})]) left_token: <Left_CommandSub "$("> spids: [289 293] ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FTP_SERVER) op: Equal rhs: {(10.0.2.2)} spids: [302] ) ] spids: [302] ) ] spids: [196 306] ) ] spids: [-1 163] ) ] spids: [-1 308] ) (C {(export)} {(Lit_VarLike "HDC=") (DQ ($ VSub_Name "$HDCFILE"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:NATIVE_BUILD) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(DQ ($ VSub_Name "$HDCFILE"))}) (C {(sed)} {(-e)} {(SQ <"s@.*/@@">)} {(-e)} {(SQ <"s@[.]hdc$@@">)}) ] negated: False ) ] ) left_token: <Left_CommandSub "$("> spids: [327 349] ) ) } spids: [325] ) ] spids: [325] ) (C {(export)} {(Lit_VarLike "KERNEL_EXTRA=") (DQ ("FTP_SERVER=") ($ VSub_Name "$FTP_SERVER") (" FTP_PORT=") ($ VSub_Name "$FTP_PORT") (" NATIVE_BUILD=") ($ VSub_Name "$NATIVE_BUILD") (" ") ($ VSub_Name "$KERNEL_EXTRA") ) } ) (AndOr children: [ (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$HDB"))} {(Lit_Other "]")}) (C {(rm)} {(-f)} {(hdb.img)}) ] op_id: Op_DAmp ) (C {(./dev-environment.sh)}) (C {(echo)} {(Lit_Other "=") (Lit_Other "=") (Lit_Other "=")} {(End)} {(native)} {(build)}) ] )