(command.CommandList children: [ (command.ShFunction name_tok: <usage> name: usage body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Usage: '> ($ Id.VSub_Number 0) <' <dvd_img_name> <cd_img_name <cd_img_name ..>>'> ) } ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <copycd> name: copycd body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'md='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'md='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'md='> name:md) op: assign_op.Equal rhs: {(DQ )} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike '_os='> pairs: [ (AssignPair left: <Id.Lit_VarLike '_os='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_os='> name:_os) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike '_img='> pairs: [ (AssignPair left: <Id.Lit_VarLike '_img='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_img='> name:_img) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike '_mnt='> pairs: [ (AssignPair left: <Id.Lit_VarLike '_mnt='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_mnt='> name:_mnt) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 3))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike '_dst='> pairs: [ (AssignPair left: <Id.Lit_VarLike '_dst='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_dst='> name:_dst) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 4))} ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-ne>} {(DQ <4>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: function '> (${ Id.VSub_Number 0) <' takes exactly four parameters.'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [171 186] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _os))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <FreeBSD>)} {<-a>} {(DQ (${ Id.VSub_Name _os))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Error: do not know how to handle '> (${ Id.VSub_Name _os) <' os.'>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [208 243] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {(DQ (${ Id.VSub_Name _img))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: file '> (${ Id.VSub_Name _img) <' does not exists or not a regula file.'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [265 282] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} {(DQ (${ Id.VSub_Name _img))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Error: you do not have the read permissions.'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [304 321] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ (${ Id.VSub_Name _mnt))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: '> (${ Id.VSub_Name _mnt) <' is not a directory or does not exists.'> ) } ] redirects: [] do_fork: T ) ] spids: [339 356] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ (${ Id.VSub_Name _dst))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: '> (${ Id.VSub_Name _dst) <' is not a directory or does not exists.'> ) } ] redirects: [] do_fork: T ) ] spids: [373 390] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-w>} {(DQ (${ Id.VSub_Name _dst))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: you do not have write permissions granted for '> (${ Id.VSub_Name _dst) <' directory.'> ) } ] redirects: [] do_fork: T ) ] spids: [407 424] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _os))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.AndOr children: [ (command.ShAssignment left: <Id.Lit_VarLike 'md='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'md='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'md='> name:md) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <mdconfig> more_env: [] words: [ {<mdconfig>} {<-a>} {<-t>} {<vnode>} {<-f>} {(${ Id.VSub_Name _img)} ] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <mount_cd9660> more_env: [] words: [ {<mount_cd9660>} {<'/dev/'> (${ Id.VSub_Name md)} {(${ Id.VSub_Name _mnt)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ops: [<Id.Op_DPipe _>] ) ] spids: [441 461] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.AndOr children: [ (command.Simple blame_tok: <mount> more_env: [] words: [{<mount>} {<-o>} {<loop>} {(${ Id.VSub_Name _img)} {(${ Id.VSub_Name _mnt)}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ops: [<Id.Op_DPipe _>] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {(${ Id.VSub_Name _mnt) <'/cdrom.inf'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Error: Failed to find cdrom.inf for '> (${ Id.VSub_Name _img) <.>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [535 551] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'cdvol='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'cdvol='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cdvol='> name:cdvol) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <grep> more_env: [] words: [ {<grep>} {(DQ <'^CD_VOLUME.*'>)} {(${ Id.VSub_Name _mnt) <'/cdrom.inf'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [{<sed>} {(DQ <'s/CD_VOLUME[[:space:]]*=[[:space:]]*//'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <test> more_env: [] words: [ {<test>} {<-z>} {(DQ (${ Id.VSub_Name cdvol))} {<-o>} {<Id.KW_Bang '!'>} {(DQ (${ Id.VSub_Name cdvol))} {<-eq>} {(DQ (${ Id.VSub_Name cdvol))} ] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Error: failed to get volume id for '> (${ Id.VSub_Name _img) <.>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [598 633] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'cdver='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'cdver='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'cdver='> name:cdver) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <grep> more_env: [] words: [ {<grep>} {(DQ <'^CD_VERSION.*'>)} {(${ Id.VSub_Name _mnt) <'/cdrom.inf'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [{<sed>} {(DQ <'s/CD_VERSION[[:space:]]*=[[:space:]]*//'>)}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Name cdver))}] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Error: failed to get version id for '> (${ Id.VSub_Name _img) <.>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [680 693] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name VERID))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VERID='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VERID='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VERID='> name:VERID) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name cdver))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike '_exclude='> pairs: [ (AssignPair left: <Id.Lit_VarLike '_exclude='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_exclude='> name:_exclude) op: assign_op.Equal rhs: {(DQ )} ) ] redirects: [] ) ] spids: [715 730] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name VERID))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name cdver))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: cd version ids mismatch while processing '> (${ Id.VSub_Name _img) <.> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [749 771] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike '_exclude='> pairs: [ (AssignPair left: <Id.Lit_VarLike '_exclude='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike '_exclude='> name:_exclude) op: assign_op.Equal rhs: {(DQ <'! -regex ./cdrom.inf ! -regex ./packages/INDEX'>)} ) ] redirects: [] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Merging '> (${ Id.VSub_Name _img) <':'>)}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Subshell left: <Id.Op_LParen _> child: (command.AndOr children: [ (command.Simple blame_tok: <cd> more_env: [] words: [{<cd>} {(DQ (${ Id.VSub_Name _mnt))}] redirects: [] do_fork: T ) (command.Pipeline children: [ (command.Simple blame_tok: <find> more_env: [] words: [{<find>} {<.>} {(${ Id.VSub_Name _exclude)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cpio> more_env: [] words: [ {<cpio>} {<-p>} {<-d>} {<-m>} {<-V>} {<--quiet>} {(DQ (${ Id.VSub_Name _dst))} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) ] ops: [<Id.Op_DAmp _>] ) right: <Id.Right_Subshell _> redirects: [] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _os))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <Linux>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.AndOr children: [ (command.Simple blame_tok: <umount> more_env: [] words: [{<umount>} {<'/dev/'> (${ Id.VSub_Name md)}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <mdconfig> more_env: [] words: [{<mdconfig>} {<-d>} {<-u>} {(DQ (${ Id.VSub_Name md))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ops: [<Id.Op_DPipe _>] ) ] spids: [869 889] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.AndOr children: [ (command.Simple blame_tok: <umount> more_env: [] words: [{<umount>} {(${ Id.VSub_Name _mnt)}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] ops: [<Id.Op_DPipe _>] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <clearmount> name: clearmount body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-ne>} {(DQ <2>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: function '> (${ Id.VSub_Number 0) <' takes exactly two parameters.'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [967 982] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Number 2))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {(DQ (${ Id.VSub_Number 2))} ) ] ops: [<Id.Op_DPipe _>] ) ] spids: [1004 1019] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <umount> more_env: [] words: [{<umount>} {(DQ (${ Id.VSub_Number 1))}] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Number 2))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {(DQ (${ Id.VSub_Number 2))} ) ] ops: [<Id.Op_DPipe _>] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <clearmd> name: clearmd body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-ne>} {(DQ <3>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: function '> (${ Id.VSub_Number 0) <' takes exactly three parameters.'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [1108 1123] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Number 1))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <FreeBSD>)} {<-o>} {<-z>} {(DQ (${ Id.VSub_Number 2))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Number 3))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {(DQ (${ Id.VSub_Number 3))} ) ] ops: [<Id.Op_DPipe _>] ) ] spids: [1145 1175] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <mdconfig> more_env: [] words: [{<mdconfig>} {<-d>} {<-u>} {(DQ (${ Id.VSub_Number 2))}] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Number 3))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {(DQ (${ Id.VSub_Number 3))} ) ] ops: [<Id.Op_DPipe _>] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '#')} {<-lt>} {<3>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Error, this script should take more than two parameters.'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [1251 1263] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [1286 1301] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-e>} {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Destination DVD image file already exists and is not a regular file.'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [1335 1352] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'The '> (${ Id.VSub_Number 1) <' file exists. Overwrite? (y/n)'>)} ] redirects: [] do_fork: T ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Simple blame_tok: <read> more_env: [] words: [{<read>} {<line>}] redirects: [] do_fork: T ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{(DQ (${ Id.VSub_Name line))}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <y> pattern: (pat.Words words:[{<y>} {<Y>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <rm> more_env: [] words: [{<rm>} {<-rf>} {(DQ (${ Id.VSub_Number 1))}] redirects: [] do_fork: T ) (command.Simple blame_tok: <touch> more_env: [] words: [{<touch>} {(DQ (${ Id.VSub_Number 1))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Break break> ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <n> pattern: (pat.Words words:[{<n>} {<N>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Please, run program again with a new value.'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] spids: [1317 1332] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'DVDIMAGE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'DVDIMAGE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DVDIMAGE='> name:DVDIMAGE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} ) ] redirects: [] ) (command.Simple blame_tok:<shift> more_env:[] words:[{<shift>}] redirects:[] do_fork:T) (command.ShAssignment left: <Id.Lit_VarLike 'count='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'count='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [i] iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}]) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Name i))}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Continue continue>)] spids: [1493 1506] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {(DQ (${ Id.VSub_Name i))} {<-o>} {<Id.KW_Bang '!'>} {<-r>} {(DQ (${ Id.VSub_Name i))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Error: The '> (${ Id.VSub_Name i) <' is not readable, do not exists or not a regular file.'> ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [1515 1544] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'count='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'count='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <expr> more_env: [] words: [ {<expr>} {(${ Id.VSub_Name count)} {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\+'> ch:'+')} {<1>} ] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name count))} {<-lt>} {<2>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Error: less than two CD images specified.'>)}] redirects: [] do_fork: T ) ] spids: [1589 1605] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'pwd='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'pwd='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pwd='> name:pwd) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <pwd> more_env: [] words: [{<pwd>}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'tmpdirin='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'tmpdirin='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpdirin='> name:tmpdirin) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name pwd) <'/tmp-'> ($ Id.VSub_Dollar '$') <-in>)} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'tmpdirout='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'tmpdirout='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'tmpdirout='> name:tmpdirout) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name pwd) <'/tmp-'> ($ Id.VSub_Dollar '$') <-out>)} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'system='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'system='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'system='> name:system) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <uname> more_env: [] words: [{<uname>} {<-s>}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'md='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'md='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'md='> name:md) op: assign_op.Equal rhs: {(DQ )} ) ] redirects: [] ) (command.Simple blame_tok: <trap> more_env: [] words: [ {<trap>} { (SQ < 'echo ""; echo "Cleaning up"; clearmount "${tmpdirin}" ""; clearmd "${system}" "${md}" ""; rm -rf "${tmpdirin}" "${tmpdirout}";' > ) } {<0>} {<1>} {<2>} {<3>} {<15>} ] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <mkdir> more_env: [] words: [{<mkdir>} {(DQ (${ Id.VSub_Name tmpdirin))}] redirects: [] do_fork: T ) (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Error: failed to create tempory '> (${ Id.VSub_Name tmpdirin))} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) right: <Id.Right_Subshell _> redirects: [] ) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <mkdir> more_env: [] words: [{<mkdir>} {(DQ (${ Id.VSub_Name tmpdirout))}] redirects: [] do_fork: T ) (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(DQ <'Error: failed to create tempory '> (${ Id.VSub_Name tmpdirout))} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) right: <Id.Right_Subshell _> redirects: [] ) ] ops: [<Id.Op_DPipe _>] ) (command.ForEach keyword: <Id.KW_For for> iter_names: [i] iterable: (for_iter.Words words:[{(DQ ($ Id.VSub_At '@'))}]) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-z>} {(DQ (${ Id.VSub_Name i))}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Continue continue>)] spids: [1750 1763] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <copycd> more_env: [] words: [ {<copycd>} {(DQ (${ Id.VSub_Name system))} {(DQ (${ Id.VSub_Name i))} {(DQ (${ Id.VSub_Name tmpdirin))} {(DQ (${ Id.VSub_Name tmpdirout))} ] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <mv> more_env: [] words: [ {<mv>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/packages/INDEX'>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/packages/INDEX'> <Id.Lit_TildeLike '~'>} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Pipeline children: [ (command.Simple blame_tok: <cat> more_env: [] words: [ {<cat>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/packages/INDEX'> <Id.Lit_TildeLike '~'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [ {<sed>} { (DQ <'s/^'> <Id.Lit_BadBackslash '\\'> <'(.*'> <Id.Lit_BadBackslash '\\'> <')|'> (${ Id.VSub_Name cdvol) <Id.Lit_Dollar '$'> <'/'> <Id.Lit_BadBackslash '\\'> <'1|1/'> ) } ] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmpdirout)) <'/packages/INDEX'>} ) ] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <rm> more_env: [] words: [ {<rm>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/packages/INDEX'> <Id.Lit_TildeLike '~'>} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <mv> more_env: [] words: [ {<mv>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/cdrom.inf'>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/cdrom.inf'> <Id.Lit_TildeLike '~'>} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Pipeline children: [ (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/cdrom.inf'> <Id.Lit_TildeLike '~'>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sed> more_env: [] words: [ {<sed>} { (DQ <'s/^'> <Id.Lit_BadBackslash '\\'> <'(CD_VOLUME[[:space:]]'> <Id.Lit_BadBackslash '\\'> <'{0,'> <Id.Lit_BadBackslash '\\'> <'}=[[:space:]]'> <Id.Lit_BadBackslash '\\'> <'{0,'> <Id.Lit_BadBackslash '\\'> <'}'> <Id.Lit_BadBackslash '\\'> <')[[:digit:]]'> <Id.Lit_BadBackslash '\\'> <'{1,'> <Id.Lit_BadBackslash '\\'> <'}/'> <Id.Lit_BadBackslash '\\'> <'11/'> ) } ] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmpdirout)) <'/cdrom.inf'>} ) ] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <rm> more_env: [] words: [{<rm>} {(DQ (${ Id.VSub_Name tmpdirout)) <'/cdrom.inf'> <Id.Lit_TildeLike '~'>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <mkisofs> more_env: [] words: [ {<mkisofs>} {<-b>} {<'boot/cdboot'>} {<-no-emul-boot>} {<-r>} {<-J>} {<-V>} {(DQ <FreeBSD_Install>)} {<-publisher>} {(DQ <'The FreeBSD Project. http://www.freebsd.org/'>)} {<-o>} {(${ Id.VSub_Name DVDIMAGE)} {(DQ (${ Id.VSub_Name tmpdirout))} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ops: [<Id.Op_DPipe _>] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )