(command.CommandList children: [ (C {<Id.KW_Set set>} {<-e>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nanobsd_sh) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [(C {<realpath>} {($ Id.VSub_Number '$0')})] ) ) } spids: [90] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:topdir) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [(C {<dirname>} {(${ Id.VSub_Name nanobsd_sh)})] ) ) } spids: [99] ) ] ) (C {<.>} {(DQ (${ Id.VSub_Name topdir) </defaults.sh>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_clean) op: assign_op.Equal rhs: {<true>} spids: [127] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_kernel) op: assign_op.Equal rhs: {<true>} spids: [130] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_installkernel) op: assign_op.Equal rhs: {<true>} spids: [133] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_world) op: assign_op.Equal rhs: {<true>} spids: [136] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_image) op: assign_op.Equal rhs: {<true>} spids: [139] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_copyout_partition) op: assign_op.Equal rhs: {<true>} spids: [142] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_native_xtools) op: assign_op.Equal rhs: {<false>} spids: [145] ) ] ) (C {<Id.KW_Set set>} {<Id.Lit_Other '+'> <e>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:args) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> command_list: (command.CommandList children: [ (C {<getopt>} {<KXbc> <Id.Lit_Other ':'> <fhiknqvw>} {($ Id.VSub_Star '$*')}) ] ) ) } spids: [154] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [(C {<usage>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<2>})] spids: [167 181] ) ] ) (C {<Id.KW_Set set>} {<-e>}) (C {<Id.KW_Set set>} {<-->} {($ Id.VSub_DollarName '$args')}) (command.ForEach iter_name: i do_arg_iter: T body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$i'))} arms: [ (case_arm pat_list: [{<-K>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_installkernel) op: assign_op.Equal rhs: {<false>} spids: [225] ) ] ) (C {<shift>}) ] spids: [221 222 232 -1] ) (case_arm pat_list: [{<-X>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_native_xtools) op: assign_op.Equal rhs: {<true>} spids: [239] ) ] ) (C {<shift>}) ] spids: [235 236 246 -1] ) (case_arm pat_list: [{<-b>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_world) op: assign_op.Equal rhs: {<false>} spids: [253] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_kernel) op: assign_op.Equal rhs: {<false>} spids: [257] ) ] ) (C {<shift>}) ] spids: [249 250 264 -1] ) (case_arm pat_list: [{<-c>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NANO_CONFIG) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [283] ) ] ) (C {<.>} {(DQ ($ Id.VSub_Number '$2'))}) (C {<shift>}) (C {<shift>}) ] spids: [267 268 300 -1] ) (case_arm pat_list: [{<-f>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_copyout_partition) op: assign_op.Equal rhs: {<false>} spids: [307] ) ] ) (C {<shift>}) ] spids: [303 304 314 -1] ) (case_arm pat_list: [{<-h>}] action: [(C {<usage>})] spids: [317 318 324 -1] ) (case_arm pat_list: [{<-i>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_image) op: assign_op.Equal rhs: {<false>} spids: [331] ) ] ) (C {<shift>}) ] spids: [327 328 338 -1] ) (case_arm pat_list: [{<-k>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_kernel) op: assign_op.Equal rhs: {<false>} spids: [345] ) ] ) (C {<shift>}) ] spids: [341 342 352 -1] ) (case_arm pat_list: [{<-n>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_clean) op: assign_op.Equal rhs: {<false>} spids: [359] ) ] ) (C {<shift>}) ] spids: [355 356 366 -1] ) (case_arm pat_list: [{<-q>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PPLEVEL) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$PPLEVEL')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [373] ) ] ) (C {<shift>}) ] spids: [369 370 387 -1] ) (case_arm pat_list: [{<-v>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PPLEVEL) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$PPLEVEL')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) } spids: [394] ) ] ) (C {<shift>}) ] spids: [390 391 408 -1] ) (case_arm pat_list: [{<-w>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:do_world) op: assign_op.Equal rhs: {<false>} spids: [415] ) ] ) (C {<shift>}) ] spids: [411 412 422 -1] ) (case_arm pat_list: [{<-->}] action: [(C {<shift>}) (command.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [425 426 -1 435] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_Pound '$#')} {<-gt>} {<0>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] action: [ (C {<echo>} {(DQ ($ Id.VSub_Number '$0') <': Extraneous arguments supplied'>)}) (C {<usage>}) ] spids: [440 454] ) ] ) (command.Simple words: [{<exec>}] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '3>&'> fd:3 arg_word:{<1>})] ) (C {<set_defaults_and_export>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ (${ Id.VSub_Name NANO_TOOLS))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<echo>} {(DQ <'NANO_TOOLS directory does not exist'>)}] redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [488 505] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children:[(C {($ Id.VSub_DollarName '$do_clean')})] negated:T) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NANO_PMAKE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name NANO_PMAKE) <' -DNO_CLEAN'>)} spids: [535] ) ] ) ] spids: [525 532] ) ] ) (C {<pprint>} {<1>} {(DQ <'NanoBSD image '> (${ Id.VSub_Name NANO_NAME) <' build starting'>)}) (C {<run_early_customize>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {($ Id.VSub_DollarName '$do_world')}) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {($ Id.VSub_DollarName '$do_clean')}) terminator: <Id.Op_Semi _> ) ] action: [(C {<clean_build>})] spids: [571 577] ) ] else_action: [(C {<pprint>} {<2>} {(DQ <'Using existing build tree (as instructed)'>)})] ) (C {<make_conf_build>}) (C {<build_world>}) ] spids: [562 568] ) ] else_action: [(C {<pprint>} {<2>} {(DQ <'Skipping buildworld (as instructed)'>)})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {($ Id.VSub_DollarName '$do_kernel')}) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [(C {($ Id.VSub_DollarName '$do_world')})] negated: T ) terminator: <Id.Op_Semi _> ) ] action: [(C {<make_conf_build>})] spids: [626 634] ) ] ) (C {<build_kernel>}) ] spids: [617 623] ) ] else_action: [(C {<pprint>} {<2>} {(DQ <'Skipping buildkernel (as instructed)'>)})] ) (C {<clean_world>}) (C {<make_conf_install>}) (C {<install_world>}) (C {<install_etc>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {($ Id.VSub_DollarName '$do_native_xtools')}) terminator: <Id.Op_Semi _> ) ] action: [(C {<native_xtools>})] spids: [667 673] ) ] ) (C {<setup_nanobsd_etc>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {($ Id.VSub_DollarName '$do_installkernel')}) terminator: <Id.Op_Semi _> ) ] action: [(C {<install_kernel>})] spids: [682 688] ) ] else_action: [(C {<pprint>} {<2>} {(DQ <'Skipping installkernel (as instructed)'>)})] ) (C {<run_customize>}) (C {<setup_nanobsd>}) (C {<prune_usr>}) (C {<run_late_customize>}) (C {<fixup_before_diskimage>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {($ Id.VSub_DollarName '$do_image')}) terminator: <Id.Op_Semi _> ) ] action: [(C {<create_diskimage>})] spids: [717 723] ) ] else_action: [(C {<pprint>} {<2>} {(DQ <'Skipping image build (as instructed)'>)})] ) (C {<last_orders>}) (C {<pprint>} {<1>} {(DQ <'NanoBSD image '> (${ Id.VSub_Name NANO_NAME) <' completed'>)}) ] )