(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 (${ Id.VSub_Number 0) <' usage:'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ (${ Id.VSub_At '@'))}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <main> name: main body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <local> more_env: [] words: [{<local>} {<arg>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'VMCONFIG='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMCONFIG='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VMCONFIG='> name:VMCONFIG) op: assign_op.Equal rhs: {(DQ <'/dev/null'>)} ) ] redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <getopts> more_env: [] words: [{<getopts>} {(DQ <'C:c:d:f:i:o:s:S:'>)} {<arg>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{(DQ (${ Id.VSub_Name arg))}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <C> pattern: (pat.Words words:[{<C>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VMBUILDCONF='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMBUILDCONF='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'VMBUILDCONF='> name: VMBUILDCONF ) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <c> pattern: (pat.Words words:[{<c>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VMCONFIG='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMCONFIG='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'VMCONFIG='> name: VMCONFIG ) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <d> pattern: (pat.Words words:[{<d>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'DESTDIR='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'DESTDIR='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'DESTDIR='> name: DESTDIR ) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <f> pattern: (pat.Words words:[{<f>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VMFORMAT='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMFORMAT='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'VMFORMAT='> name: VMFORMAT ) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <i> pattern: (pat.Words words:[{<i>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VMBASE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMBASE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VMBASE='> name:VMBASE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <o> pattern: (pat.Words words:[{<o>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VMIMAGE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMIMAGE='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'VMIMAGE='> name: VMIMAGE ) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <s> pattern: (pat.Words words:[{<s>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'VMSIZE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'VMSIZE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'VMSIZE='> name:VMSIZE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <S> pattern: (pat.Words words:[{<S>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'WORLDDIR='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'WORLDDIR='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'WORLDDIR='> name: WORLDDIR ) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name OPTARG))} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.Simple blame_tok: <shift> more_env: [] words: [ {<shift>} { (word_part.ArithSub left: <Id.Left_DollarDParen '$(('> anode: (arith_expr.Binary op_id: Id.Arith_Minus left: {(${ Id.VSub_Name OPTIND)} right: {<Id.Lit_Digits 1>} ) right: <Id.Right_DollarDParen _> ) } ] redirects: [] do_fork: T ) (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_Name VMBASE))} {<-o>} {<-z>} {(DQ (${ Id.VSub_Name WORLDDIR))} {<-o>} {<-z>} {(DQ (${ Id.VSub_Name DESTDIR))} {<-o>} {<-z>} {(DQ (${ Id.VSub_Name VMSIZE))} {<-o>} {<-z>} {(DQ (${ Id.VSub_Name VMIMAGE))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.AndOr children: [ (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] ops: [<Id.Op_DPipe _>] ) ] spids: [325 389] ) ] 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.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name VMBUILDCONF))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name VMBUILDCONF))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Must provide the path to vmimage.subr.'>)}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [405 436] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {(DQ (${ Id.VSub_Name VMBUILDCONF))}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(DQ (${ Id.VSub_Name VMCONFIG))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-c>} {(DQ (${ Id.VSub_Name VMCONFIG))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {(DQ (${ Id.VSub_Name VMCONFIG))}] redirects: [] do_fork: T ) ] spids: [465 498] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w: {(${ Id.VSub_Name TARGET) <Id.Lit_Colon ':'> (${ Id.VSub_Name TARGET_ARCH)} ) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <arm64> pattern: (pat.Words words:[{<arm64> <Id.Lit_Colon ':'> <aarch64>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'ROOTLABEL='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'ROOTLABEL='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ROOTLABEL='> name:ROOTLABEL) op: assign_op.Equal rhs: {(DQ <ufs>)} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'NOSWAP='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'NOSWAP='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NOSWAP='> name:NOSWAP) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'ROOTLABEL='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'ROOTLABEL='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ROOTLABEL='> name:ROOTLABEL) op: assign_op.Equal rhs: {(DQ <gpt>)} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.Simple blame_tok: <vm_create_base> more_env: [] words: [{<vm_create_base>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_install_base> more_env: [] words: [{<vm_install_base>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_extra_install_base> more_env: [] words: [{<vm_extra_install_base>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_extra_install_packages> more_env: [] words: [{<vm_extra_install_packages>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_extra_install_ports> more_env: [] words: [{<vm_extra_install_ports>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_extra_enable_services> more_env: [] words: [{<vm_extra_enable_services>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_extra_pre_umount> more_env: [] words: [{<vm_extra_pre_umount>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_extra_pkg_rmcache> more_env: [] words: [{<vm_extra_pkg_rmcache>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cleanup> more_env: [] words: [{<cleanup>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <vm_copy_base> more_env: [] words: [{<vm_copy_base>}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <vm_create_disk> more_env: [] words: [{<vm_create_disk>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <vm_extra_create_disk> more_env: [] words: [{<vm_extra_create_disk>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple blame_tok: <main> more_env: [] words: [{<main>} {(DQ ($ Id.VSub_At '@'))}] redirects: [] do_fork: T ) ] )