(command.CommandList
  children: [
    (C {<set>} {<-o>} {<nounset>})
    (C {<set>} {<-o>} {<pipefail>})
    (C {<set>} {<-o>} {<errexit>})
    (command.ShFunction
      name: show-checksum
      body: (BraceGroup children:[(C {<sha1sum>} {<k-script-build-static>})])
    )
    (command.ShFunction
      name: build
      body: 
        (BraceGroup
          children: [
            (C {<'./configure'>})
            (C {<rm>} {<-v>} {<-f>} {<k-script-build-static>})
            (command.TimeBlock pipeline:(C {<make>} {<k-script-build-static>}))
            (C {<'./k-script-build-static'>} {<--help>})
            (C {<show-checksum>})
          ]
        )
    )
    (command.ShFunction
      name: make-osh
      body: 
        (BraceGroup
          children: [
            (C {<'./configure'>})
            (C {<rm>} {<-v>} {<-f>} {<k-script-build-static>})
            (command.TimeBlock
              pipeline: 
                (C {<make>} 
                  {<Id.Lit_VarLike 'SHELL='> <Id.Lit_TildeLike '~'> <'/git/oilshell/oil/bin/osh'>} {<k-script-build-static>}
                )
            )
            (C {<'./k-script-build-static'>} {<--help>})
            (C {<show-checksum>})
          ]
        )
    )
    (command.ShFunction
      name: osh
      body: 
        (BraceGroup
          children: [
            (C {(word_part.TildeSub token:<Id.Lit_TildeLike '~'>) <'/git/oilshell/oil/bin/osh'>} 
              {(DQ ($ Id.VSub_At '$@'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: build-with-osh
      body: 
        (BraceGroup
          children: [
            (C {<rm>} {<-v>} {<-f>} {<k-script-build-static>})
            (C {<export>} {<Id.Lit_VarLike 'PS4='> (SQ <'+${SOURCE_NAME}:${LINENO} '>)})
            (C {<pushd>} {<src>})
            (command.TimeBlock
              pipeline: 
                (C {<osh>} {<'./k-script-build.sh'>} {<--static>} {<--file>} {<k-script-build.sh>} 
                  {<--output>} {<'../k-script-build-static'>} {<--executable>}
                )
            )
            (C {<popd>})
            (C {<cp>} {<k-script-build-static>} {<k-script-build-static-OSH>})
            (C {<show-checksum>})
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)