(command.CommandList children: [ (C {<set>} {<-x>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'MOUNTPOINT='> name:MOUNTPOINT) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} spids: [9] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName MOUNTPOINT))} {<Id.Lit_RBracket ']'>} ) (C {<echo>} {(DQ <'No mountpoint specified'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) (C {<mkdir>} {<-p>} {(DQ ($ Id.VSub_DollarName MOUNTPOINT))}) (command.ShFunction name: mount_drive body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DEVS='> name:DEVS) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<find>} {<'/dev'>} {<-maxdepth>} {<1>} {<-type>} {<b>} {<Id.KW_Bang '!'>} {<-name>} {(SQ <'loop*'>)} {<Id.KW_Bang '!'>} {<-name>} {(SQ <'nbd*'>)} ) (C {<grep>} {<-v>} {(SQ <'[0-9]$'>)}) (C {<sed>} {(SQ <'s@.*/dev/@@'>)}) (C {<sort>}) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) ) } spids: [60] ) ] redirects: [] ) (command.ForEach iter_names: [DEV] iterable: (for_iter.Words words:[{($ Id.VSub_DollarName DEVS)}]) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DRIVE='> name:DRIVE) op: assign_op.Equal rhs: {(DQ <'/dev/'> (${ Id.VSub_Name DEV))} spids: [129] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Simple words: [{<sfdisk>} {<-d>} {(DQ (${ Id.VSub_Name DRIVE))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DATA='> name:DATA) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<sfdisk>} {<-J>} {(DQ ($ Id.VSub_DollarName DRIVE))}) (C {<jq>} {<-e>} {<-r>} { (SQ < '.partitiontable.partitions | map(select(.type=="83")) | .[0].node' > ) } ) ] negated: F stderr_indices: [] ) right: <Id.Eof_RParen _> ) } spids: [169] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<mount>} {(DQ ($ Id.VSub_DollarName DATA))} {(DQ ($ Id.VSub_DollarName MOUNTPOINT))} ) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] ) ] spids: [193 206] ) ] else_action: [] redirects: [] ) ] spids: [143 162] ) ] else_action: [] redirects: [] ) ] ) redirects: [] ) (C {<echo>} {(DQ <'WARNING: Failed to mount a persistent volume (is there one?)'>)}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<mount_drive>}) ] )