(command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(source)} {(sources/include.sh)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:17) arg_word: {(1)} ) ] ) (command.Simple words: [{(load_target)} {(DQ ($ Id.VSub_Number '$1'))}] more_env: [(env_pair name:KEEP_STAGEDIR val:{(1)} spids:[29])] ) (command.ShFunction name: is_newer body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:X) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [50] ) ] ) (C {(shift)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-e)} {(DQ ($ Id.VSub_DollarName '$X'))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:73) arg_word: {(0)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:81) command_list: (command.CommandList children: [(C {(which)} {(DQ (${ Id.VSub_Name CC_PREFIX) (cc))})] ) ) ) } {(-nt)} {(DQ ($ Id.VSub_DollarName '$X'))} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:103) arg_word: {(0)} ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:108) cond: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_RBracket ']')} ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:133) command_list: (command.CommandList children: [ (command.Simple words: [ {(find)} {(DQ ($ Id.VSub_Number '$1'))} {(-newer)} {(DQ ($ Id.VSub_DollarName '$X'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:146) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) ) } {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:155) arg_word: {(0)} ) ] ) (C {(shift)}) ] ) ) (C {(echo)} { (DQ ('Keeping ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:171) command_list: (command.CommandList children: [(C {(basename)} {(DQ ($ Id.VSub_DollarName '$X'))})] ) ) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:181) arg_word: {(1)} ) ] ) ) (command.ShFunction name: qemu_defaults body: (command.BraceGroup children: [ (C {(echo)} {(-n)} {(DQ ('-nographic -no-reboot -kernel linux'))}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$SYSIMAGE_TYPE'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ (rootfs))} {(Id.Lit_RBracket ']')} ) (C {(echo)} {(-n)} {(DQ (' -initrd rootfs.cpio.gz'))}) ] ) (C {(echo)} {(-n)} { (DQ (' -append ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:240) ) ('panic=1 console=') ($ Id.VSub_DollarName '$CONSOLE') (' HOST=') ($ Id.VSub_DollarName '$ARCH') (' ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:246) ) (KERNEL_EXTRA) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\"' span_id:248)) ) } ) (C {(echo)} {(-n)} { (DQ (' ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:258) ) (QEMU_EXTRA) ) } ) ] ) ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:277) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/run-emulator.sh))} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:284) fd: -1 here_begin: {(EOF)} here_end_span_id: 326 stdin_parts: [ ('#!/bin/bash\n') ('\n') ('# Boot the emulated system to a shell prompt.\n') ('\n') ('ARCH=') ($ Id.VSub_DollarName '$ARCH') ('\n') ('run_emulator()\n') ('{\n') (' [ ! -z ') (Id.Right_DoubleQuote '"') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:301) ) (DEBUG) (Id.Right_DoubleQuote '"') (' ] && set -x\n') (' ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:306) command_list: (command.CommandList children:[(C {(emulator_command)})]) ) ('\n') ('}\n') ('\n') ('if [ ') (Id.Right_DoubleQuote '"') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:314) ) (1) (Id.Right_DoubleQuote '"') (' != ') (Id.Right_DoubleQuote '"') (--norun) (Id.Right_DoubleQuote '"') (' ]\n') ('then\n') (' run_emulator\n') ('fi\n') ] ) ] ) (C {(chmod)} {(Id.Lit_Other '+') (x)} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/run-emulator.sh))} ) (command.ForEach iter_name: FILE iter_words: [{(dev-environment.sh)} {(native-build.sh)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Subshell command_list: (command.CommandList children: [ (C {(export)} {(Id.Lit_VarLike 'IFS=') (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:362) command_list: (command.CommandList children: [(C {(echo)} {(-e)} {(DQ (Id.Lit_Other '\\') (n))})] ) ) ) } ) (command.Pipeline children: [ (C {(cat)} { (DQ ($ Id.VSub_DollarName '$SOURCES') (/toys/) ($ Id.VSub_DollarName '$FILE') ) } ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:385) cond: [(C {(read)} {(-r)} {(i)})] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:i span_id:403) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {(Id.Lit_Digits 0)} ) length: (arith_expr.ArithWord w: {(Id.Lit_Digits 8)} ) ) ) ) } {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} {(DQ ('INCLUDE '))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(cat)} { (DQ ($ Id.VSub_DollarName '$SOURCES') (/toys/) (braced_var_sub token: (Token id: Id.VSub_Name val: i span_id: 430 ) suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w: {(Id.Lit_Digits 8)} ) ) ) ) } ) (C {(dienow)}) ] ) ] spids: [397 421] ) ] else_action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(echo)} {(DQ ($ Id.VSub_DollarName '$i'))}) (C {(dienow)}) ] ) ] ) ] ) ) ] negated: F ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:467) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/) ($ Id.VSub_DollarName '$FILE'))} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(chmod)} {(Id.Lit_Other '+') (x)} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/) ($ Id.VSub_DollarName '$FILE'))} ) (C {(dienow)}) ] ) ] ) ) ] ) (command.If arms: [ (if_arm cond: [ (C {(is_newer)} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/rootfs.cpio.gz))} { (DQ ($ Id.VSub_DollarName '$BUILD') (/root-filesystem-) ($ Id.VSub_DollarName '$ARCH')) } ) ] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (command.Simple words: [ {(image_filesystem)} { (DQ ($ Id.VSub_DollarName '$BUILD') (/root-filesystem-) ($ Id.VSub_DollarName '$ARCH') ) } {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/temp))} ] more_env: [(env_pair name:SYSIMAGE_TYPE val:{(cpio)} spids:[517])] ) (C {(mv)} {(-f)} (word.BracedTree parts: [ (DQ ($ Id.VSub_DollarName '$STAGE_DIR')) (/) (word_part.BracedTuple words:[{(temp)} {(rootfs)}]) (.cpio.gz) ] ) ) (C {(dienow)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$SYSIMAGE_TYPE'))} {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} {(rootfs)} {(Id.Lit_RBracket ']')} ) (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/linux))}) ] ) ] spids: [499 514] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-e)} { (DQ ($ Id.VSub_DollarName '$BUILD') (/native-compiler-) ($ Id.VSub_DollarName '$ARCH') ) } {(Id.Lit_RBracket ']')} ) (C {(is_newer)} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/toolchain.sqf))} { (DQ ($ Id.VSub_DollarName '$BUILD') (/native-compiler-) ($ Id.VSub_DollarName '$ARCH') ) } ) ] ) ] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (command.Simple words: [ {(image_filesystem)} { (DQ ($ Id.VSub_DollarName '$BUILD') (/native-compiler-) ($ Id.VSub_DollarName '$ARCH') ) } {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/temp))} ] more_env: [(env_pair name:SYSIMAGE_TYPE val:{(squashfs)} spids:[622])] ) (C {(mv)} {(-f)} (word.BracedTree parts: [ (DQ ($ Id.VSub_DollarName '$STAGE_DIR')) (/) (word_part.BracedTuple words:[{(temp)} {(toolchain)}]) (.sqf) ] ) ) (C {(dienow)}) ] ) ] spids: [589 619] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(is_newer)} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/linux))} { (DQ ($ Id.VSub_DollarName '$BUILD') (/root-filesystem-) ($ Id.VSub_DollarName '$ARCH')) } { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:686) command_list: (command.CommandList children:[(C {(package_cache)} {(linux)})]) ) } ) ] action: [ (C {(setupfor)} {(linux)}) (command.Simple words: [ {(echo)} { (DQ ('# make allnoconfig ARCH=') (braced_var_sub token: (Token id:Id.VSub_Name val:BOOT_KARCH span_id:705) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$KARCH')} ) ) (' KCONFIG_ALLCONFIG=mini.config') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:714) fd: -1 arg_word: {($ Id.VSub_DollarName '$STAGE_DIR') (/mini.config)} ) ] ) (command.Simple words: [{(getconfig)} {(linux)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:724) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR')) (/mini.config)} ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$SYSIMAGE_TYPE'))} {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} {(rootfs)} {(Id.Lit_RBracket ']')} ) (command.Simple words: [ {(echo)} {(-e)} { (DQ ('CONFIG_INITRAMFS_SOURCE=') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:754) ) ($ Id.VSub_DollarName '$STAGE_DIR') (/rootfs.cpio.gz) (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:757) ) (Id.Lit_Other '\\') (n) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_DGreat val:'>>' span_id:764) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$STAGE_DIR')) (/mini.config)} ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.Simple words: [ {(make)} {(allnoconfig)} {(Id.Lit_VarLike 'ARCH=') (braced_var_sub token: (Token id:Id.VSub_Name val:BOOT_KARCH span_id:778) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$KARCH')} ) ) } {($ Id.VSub_DollarName '$LINUX_FLAGS')} {(Id.Lit_VarLike 'KCONFIG_ALLCONFIG=') (DQ ($ Id.VSub_DollarName '$STAGE_DIR')) (/mini.config) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:793) fd: -1 arg_word: {(/dev/null)} ) ] ) (C {(make)} {(-j)} {($ Id.VSub_DollarName '$CPUS')} {(Id.Lit_VarLike 'ARCH=') (braced_var_sub token: (Token id:Id.VSub_Name val:BOOT_KARCH span_id:807) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$KARCH')} ) ) } {($ Id.VSub_DollarName '$DO_CROSS')} {($ Id.VSub_DollarName '$LINUX_FLAGS')} {($ Id.VSub_DollarName '$VERBOSITY')} ) (C {(cp)} {(DQ ($ Id.VSub_DollarName '$KERNEL_PATH'))} {(DQ ($ Id.VSub_DollarName '$STAGE_DIR') (/linux))} ) ] ) (C {(cleanup)}) ] spids: [669 692] ) ] ) (command.Simple words: [{(create_stage_tarball)}] more_env: [(env_pair name:ARCH val:{(DQ ($ Id.VSub_DollarName '$ARCH_NAME'))} spids:[842])] ) (C {(announce)} {(DQ ('Packaging complete'))}) ] )