#!/bin/bash # Rerun if test $Argc -lt 2 { echo "usage: more/tweak.sh ARCH STAGE COMMAND..." > !1 exit 1 } test ! -e "$2".sh && echo "No stage $2" > !2 && exit 1 global ARCH := $1 global STAGE := $2 test $STAGE == "native-compiler" && global STUFF := ''STAGE_DIR=$STAGE_DIR/usr HOST_ARCH=$ARCH'' shift shift env NO_CLEANUP=temp STAGE_NAME=$STAGE more/test.sh $ARCH \ $STUFF @Argv " && create_stage_tarball" || exit 1 env NO_CLEANUP=temp AFTER=$STAGE ./build.sh $ARCH $STAGE (CommandList children: [ (If arms: [ (if_arm cond: [(C {(Lit_Other "[")} {($ VSub_Pound "$#")} {(-lt)} {(2)} {(Lit_Other "]")})] action: [ (SimpleCommand words: [{(echo)} {(DQ ("usage: more/tweak.sh ARCH STAGE COMMAND..."))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(1)} spids:[29])] ) (C {(exit)} {(1)}) ] spids: [-1 20] ) ] spids: [-1 37] ) (AndOr children: [ (C {(Lit_Other "[")} {(KW_Bang "!")} {(-e)} {(DQ ($ VSub_Number "$2")) (.sh)} {(Lit_Other "]")}) (AndOr children: [ (SimpleCommand words: [{(echo)} {(DQ ("No stage ") ($ VSub_Number "$2"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[62])] ) (C {(exit)} {(1)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ARCH) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [71] ) ] spids: [71] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:STAGE) op: Equal rhs: {(DQ ($ VSub_Number "$2"))} spids: [76] ) ] spids: [76] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$STAGE"))} {(Lit_Other "=") (Lit_Other "=")} {(DQ (native-compiler))} {(Lit_Other "]")} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:STUFF) op: Equal rhs: {(SQ <"STAGE_DIR=$STAGE_DIR/usr HOST_ARCH=$ARCH">)} spids: [99] ) ] spids: [99] ) ] op_id: Op_DAmp ) (C {(shift)}) (C {(shift)}) (AndOr children: [ (SimpleCommand words: [ {(more/test.sh)} {(DQ ($ VSub_Name "$ARCH"))} {($ VSub_Name "$STUFF")} {(DQ ($ VSub_At "$@"))} {(DQ (" && create_stage_tarball"))} ] more_env: [ (env_pair name:NO_CLEANUP val:{(temp)} spids:[109]) (env_pair name:STAGE_NAME val:{(DQ ($ VSub_Name "$STAGE"))} spids:[112]) ] ) (C {(exit)} {(1)}) ] op_id: Op_DPipe ) (SimpleCommand words: [{(./build.sh)} {(DQ ($ VSub_Name "$ARCH"))} {(DQ ($ VSub_Name "$STAGE"))}] more_env: [ (env_pair name:NO_CLEANUP val:{(temp)} spids:[141]) (env_pair name:AFTER val:{(DQ ($ VSub_Name "$STAGE"))} spids:[144]) ] ) ] )