(command.CommandList children: [ (C {(set)} {(-o)} {(nounset)}) (C {(set)} {(-o)} {(pipefail)}) (C {(set)} {(-o)} {(errexit)}) (command.FuncDef name: log body: (command.BraceGroup children: [ (command.SimpleCommand words: [{(echo)} {(DQ ($ VSub_At '$@'))}] redirects: [(redir.Redir op:<Redir_GreatAnd '1>&'> fd:1 arg_word:{(2)})] ) ] ) ) (command.FuncDef name: versioned-dest body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:branch) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--abbrev-ref)} {(HEAD)})] ) left_token: <Left_DollarParen '$('> ) } ) ] ) (C {(log)} {(DQ ('branch ') ($ VSub_DollarName '$branch'))}) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:hash) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {($ VSub_DollarName '$branch')})] ) left_token: <Left_DollarParen '$('> ) } ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:short_hash) op: Equal rhs: { (word_part.BracedVarSub token: <VSub_Name hash> suffix_op: (suffix_op.Slice begin: (arith_expr.ArithWord w:{(Lit_Digits 0)}) length: (arith_expr.ArithWord w:{(Lit_Digits 8)}) ) ) } ) ] ) (C {(log)} {(DQ ('hash ') ($ VSub_DollarName '$short_hash'))}) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest) op: Equal rhs: { (DQ (oilshell.org/git-branch/) ($ VSub_DollarName '$branch') (/) ($ VSub_DollarName '$short_hash') ) } ) ] ) (C {(echo)} {($ VSub_DollarName '$dest')}) ] ) ) (command.FuncDef name: spec body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:user) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:host) op: Equal rhs: {($ VSub_Number '$2')} ) ] ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:dest) op:Equal)] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(versioned-dest)})]) left_token: <Left_DollarParen '$('> ) (/) (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(hostname)})]) left_token: <Left_DollarParen '$('> ) (/spec) ) } ) ] ) (C {(ssh)} {($ VSub_DollarName '$user') (Lit_Other '@') ($ VSub_DollarName '$host')} {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')} ) (C {(rsync)} {(--archive)} {(--verbose)} {(--copy-links)} {(_tmp/spec/)} {($ VSub_DollarName '$user') (Lit_Other '@') ($ VSub_DollarName '$host') (Lit_Other ':') ($ VSub_DollarName '$dest') (/) } ) (C {(echo)} {(DQ ('Visit http://') ($ VSub_DollarName '$dest') (/RESULTS.html))}) ] ) ) (command.FuncDef name: unit body: (command.BraceGroup children:[(C {(echo)} {(SQ <'Hello from publish.sh'>)})]) ) (command.FuncDef name: wild body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:user) op: Equal rhs: {($ VSub_Number '$1')} ) ] ) (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:host) op: Equal rhs: {($ VSub_Number '$2')} ) ] ) (command.Assignment keyword: Assign_Local pairs: [(assign_pair lhs:(lhs_expr.LhsName name:dest) op:Equal)] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:dest) op: Equal rhs: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(versioned-dest)})]) left_token: <Left_DollarParen '$('> ) ) } ) ] ) (C {(ssh)} {($ VSub_DollarName '$user') (Lit_Other '@') ($ VSub_DollarName '$host')} {(mkdir)} {(-p)} {($ VSub_DollarName '$dest')} ) (C {(rsync)} {(--archive)} {(--verbose)} {(_release/VERSION/test/wild.wwz)} {($ VSub_DollarName '$user') (Lit_Other '@') ($ VSub_DollarName '$host') (Lit_Other ':') ($ VSub_DollarName '$dest') (/) } ) (C {(echo)} {(DQ ('Visit http://') ($ VSub_DollarName '$dest') (/wild.wwz/))}) ] ) ) (C {(DQ ($ VSub_At '$@'))}) ] )