(CommandList
  children: [
    (C {(set)} {(-o)} {(nounset)})
    (C {(set)} {(-o)} {(pipefail)})
    (C {(set)} {(-o)} {(errexit)})
    (FuncDef
      name: log
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_At "$@"))}]
              redirects: [(Redir op_id:Redir_GreatAnd fd:1 arg_word:{(2)} spids:[45])]
            )
          ]
          spids: [36]
        )
      spids: [32 35]
    )
    (FuncDef
      name: versioned-dest
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:label)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: 
                              {
                                (CommandSubPart
                                  command_list: (CommandList children:[(C {(hostname)})])
                                  left_token: <Left_CommandSub "$(">
                                  spids: [64 66]
                                )
                              }
                          )
                        spids: [61 67]
                      )
                    }
                  spids: [60]
                )
              ]
              spids: [58]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:branch)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(git)} {(rev-parse)} {(--abbrev-ref)} {(HEAD)})]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [77 85]
                      )
                    }
                  spids: [76]
                )
              ]
              spids: [74]
            )
            (C {(log)} {(DQ ("branch ") ($ VSub_Name "$branch"))})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:hash)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [(C {(git)} {(rev-parse)} {($ VSub_Name "$branch")})]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [99 105]
                      )
                    }
                  spids: [98]
                )
              ]
              spids: [96]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:short_hash)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Name hash>
                        suffix_op: 
                          (Slice
                            begin: (ArithWord w:{(Lit_Digits 0)})
                            length: (ArithWord w:{(Lit_Digits 8)})
                          )
                        spids: [111 117]
                      )
                    }
                  spids: [110]
                )
              ]
              spids: [108]
            )
            (C {(log)} {(DQ ("hash ") ($ VSub_Name "$short_hash"))})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: 
                    {
                      (DQ (oilshell.org/git-branch/) ($ VSub_Name "$branch") (/) 
                        ($ VSub_Name "$short_hash") (/) ($ VSub_Name "$label")
                      )
                    }
                  spids: [131]
                )
              ]
              spids: [129]
            )
            (C {(echo)} {($ VSub_Name "$dest")})
          ]
          spids: [55]
        )
      spids: [51 54]
    )
    (FuncDef
      name: spec
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:user)
                  op: Equal
                  rhs: {($ VSub_Number "$1")}
                  spids: [158]
                )
              ]
              spids: [156]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:host)
                  op: Equal
                  rhs: {($ VSub_Number "$2")}
                  spids: [164]
                )
              ]
              spids: [162]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:dest) op:Equal spids:[171])]
              spids: [169]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(versioned-dest)})])
                          left_token: <Left_CommandSub "$(">
                          spids: [176 178]
                        ) (/spec)
                      )
                    }
                  spids: [174]
                )
              ]
              spids: [174]
            )
            (C {(ssh)} {($ VSub_Name "$user") (Lit_Other "@") ($ VSub_Name "$host")} {(mkdir)} {(-p)} 
              {($ VSub_Name "$dest")}
            )
            (C {(rsync)} {(--archive)} {(--verbose)} {(--copy-links)} {(_tmp/spec/)} 
              {($ VSub_Name "$user") (Lit_Other "@") ($ VSub_Name "$host") (Lit_Other ":") 
                ($ VSub_Name "$dest") (/)
              }
            )
            (C {(echo)} {(DQ ("Visit http://") ($ VSub_Name "$dest") (/RESULTS.html))})
          ]
          spids: [153]
        )
      spids: [149 152]
    )
    (FuncDef
      name: unit
      body: (BraceGroup children:[(C {(echo)} {(SQ <"Hello from publish.sh">)})] spids:[249])
      spids: [245 248]
    )
    (FuncDef
      name: compress-wild
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: {(_tmp/wild-deploy)}
                  spids: [273]
                )
              ]
              spids: [271]
            )
            (C {(mkdir)} {(-p)} {($ VSub_Name "$dest")})
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:out)
                  op: Equal
                  rhs: {($ VSub_Name "$PWD") (/) ($ VSub_Name "$dest") (/wild.wwz)}
                  spids: [287]
                )
              ]
              spids: [285]
            )
            (C {(rm)} {(-f)} {(-v)} {($ VSub_Name "$out")})
            (C {(pushd)} {(_tmp/wild/www)})
            (TimeBlock pipeline:(C {(zip)} {(-r)} {(-q)} {($ VSub_Name "$out")} {(.)}))
            (C {(popd)})
            (C {(test/wild-runner.sh)} {(link-static)} {($ VSub_Name "$dest")})
            (C {(ls)} {(-l)} {(-h)} {($ VSub_Name "$dest")})
          ]
          spids: [268]
        )
      spids: [264 267]
    )
    (FuncDef
      name: wild
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:user)
                  op: Equal
                  rhs: {($ VSub_Number "$1")}
                  spids: [359]
                )
              ]
              spids: [357]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [
                (assign_pair
                  lhs: (LhsName name:host)
                  op: Equal
                  rhs: {($ VSub_Number "$2")}
                  spids: [365]
                )
              ]
              spids: [363]
            )
            (Assignment
              keyword: Assign_Local
              pairs: [(assign_pair lhs:(LhsName name:dest) op:Equal spids:[372])]
              spids: [370]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:dest)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (CommandSubPart
                          command_list: (CommandList children:[(C {(versioned-dest)})])
                          left_token: <Left_CommandSub "$(">
                          spids: [377 379]
                        )
                      )
                    }
                  spids: [375]
                )
              ]
              spids: [375]
            )
            (C {(ssh)} {($ VSub_Name "$user") (Lit_Other "@") ($ VSub_Name "$host")} {(mkdir)} {(-p)} 
              {($ VSub_Name "$dest")}
            )
            (C {(rsync)} {(--archive)} {(--verbose)} {(--copy-links)} {(_tmp/wild-deploy/)} 
              {($ VSub_Name "$user") (Lit_Other "@") ($ VSub_Name "$host") (Lit_Other ":") 
                ($ VSub_Name "$dest") (/)
              }
            )
            (C {(echo)} {(DQ ("Visit http://") ($ VSub_Name "$dest") (/wild.wwz/))})
          ]
          spids: [354]
        )
      spids: [350 353]
    )
    (C {(DQ ($ VSub_At "$@"))})
  ]
)