(command.CommandList
  children: [
    (C {<set>} {<-o>} {<nounset>})
    (C {<set>} {<-o>} {<pipefail>})
    (C {<set>} {<-o>} {<errexit>})
    (C {<readonly>} 
      {<Id.Lit_VarLike 'OIL_VERSION='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          child: (C {<head>} {<-n>} {<1>} {<oil-version.txt>})
        )
      }
    )
    (C {<export>} {<OIL_VERSION>})
    (command.ShFunction
      name: log
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_At '$@'))}]
              redirects: [(redir op:<Id.Redir_GreatAnd '1>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: _build-timestamp
      body: 
        (BraceGroup
          children: [
            (C {<echo>} {(SQ <'<hr/>'>)})
            (C {<echo>} 
              {
                (DQ <'<i>Generated on '> 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    child: (C {<date>})
                  ) <'</i>'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: _quick-ref
      body: (BraceGroup children:[(C {<'build/quick_ref.py'>} {(DQ ($ Id.VSub_At '$@'))})])
    )
    (command.ShFunction
      name: x-quick-ref
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'prog='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'out_dir='> ($ Id.VSub_Number '$2')})
            (C {<local>} 
              {<Id.Lit_VarLike 'html_out='> ($ Id.VSub_DollarName '$out_dir') <'/doc/'> 
                ($ Id.VSub_DollarName '$prog') <-quick-ref.html>
              }
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'text_out_dir='> <'_devbuild/'> ($ Id.VSub_DollarName '$prog') 
                <-quick-ref>
              }
            )
            (C {<local>} 
              {<Id.Lit_VarLike 'py_out='> <'_devbuild/gen/'> (${ Id.VSub_Name prog) <_help.py>}
            )
            (C {<mkdir>} {<-p>} {<'_build/doc'>} {($ Id.VSub_DollarName '$text_out_dir')})
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DLess '<<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_span_id: 326
                          stdin_parts: [
                            <'<!DOCTYPE html>\n'>
                            <'<html>\n'>
                            <'  <head>\n'>
                            <'    <style>\n'>
                            <'      a:link {\n'>
                            <'        text-decoration: none;\n'>
                            <'      }\n'>
                            <'      a:hover {\n'>
                            <'        text-decoration: underline;\n'>
                            <'      }\n'>
                            <'      body {\n'>
                            <'        margin: 0 auto;\n'>
                            <'        width: 40em;\n'>
                            <'      }\n'>
                            <'      /* different color because they\'re links but not topics */\n'>
                            <'      .level1 {\n'>
                            <'        /* color: green; */\n'>
                            <'        color: black;\n'>
                            <'      }\n'>
                            <'      .level2 {\n'>
                            <'        color: #555;\n'>
                            <'      }\n'>
                            <'      h1,h2,h3,h4 {\n'>
                            <'      /* color: darkcyan; */\n'>
                            <'      }\n'>
                            <'      #home-link {\n'>
                            <'        text-align: right;\n'>
                            <'      }\n'>
                            <'    </style>\n'>
                            <'  </head>\n'>
                            <'  <body>\n'>
                            <'    <p id='>
                            <Id.Right_DoubleQuote '"'>
                            <home-link>
                            <Id.Right_DoubleQuote '"'>
                            <'>\n'>
                            <'      <a href='>
                            <Id.Right_DoubleQuote '"'>
                            <'/'>
                            <Id.Right_DoubleQuote '"'>
                            <'>oilshell.org</a>\n'>
                            <'    </p>\n'>
                            <'    <p style='>
                            <Id.Right_DoubleQuote '"'>
                            <'color: darkred; font-size: x-large;'>
                            <Id.Right_DoubleQuote '"'>
                            <'>\n'>
                            <'      NOTE: This document is a work in progress!\n'>
                            <'    </p>\n'>
                          ]
                        )
                    )
                  ]
                  do_fork: T
                )
                (C {<_quick-ref>} {<toc>} {<'doc/'> (${ Id.VSub_Name prog) <-quick-ref-toc.txt>})
                (C {<_quick-ref>} {<pages>} {<'doc/'> (${ Id.VSub_Name prog) <-quick-ref-pages.txt>} 
                  {($ Id.VSub_DollarName '$text_out_dir')} {($ Id.VSub_DollarName '$py_out')}
                )
                (C {<_build-timestamp>})
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DLess '<<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_span_id: 372
                          stdin_parts: [<'  </body>\n'> <'</html>\n'>]
                        )
                    )
                  ]
                  do_fork: T
                )
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$html_out')}
                )
              ]
            )
            (C {<log>} {(DQ <'Wrote '> ($ Id.VSub_DollarName '$html_out'))})
          ]
        )
    )
    (command.ShFunction
      name: osh-quick-ref
      body: 
        (BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'out_dir='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{<_build>})
                )
              }
            )
            (C {<x-quick-ref>} {<osh>} {($ Id.VSub_DollarName '$out_dir')})
          ]
        )
    )
    (command.ShFunction
      name: markdown2html
      body: 
        (BraceGroup
          children: [
            (C {<local>} {<Id.Lit_VarLike 'src='> ($ Id.VSub_Number '$1')})
            (C {<local>} {<Id.Lit_VarLike 'out='> ($ Id.VSub_Number '$2')})
            (C {<local>} 
              {<Id.Lit_VarLike 'monospace='> 
                (braced_var_sub
                  token: <Id.VSub_Number 3>
                  suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonHyphen ':-'> arg_word:{})
                )
              }
            )
            (C {<mkdir>} {<-p>} {<'_build/doc'>})
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DLess '<<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_span_id: 493
                          stdin_parts: [
                            <'<!DOCTYPE html>\n'>
                            <'<html>\n'>
                            <'  <head>\n'>
                            <'    <style>\n'>
                            <'      body {\n'>
                            <'        margin: 0 auto;\n'>
                            <'        width: 40em;\n'>
                            <'        '>
                            ($ Id.VSub_DollarName '$monospace')
                            <'\n'>
                            <'      }\n'>
                            <'      pre {\n'>
                            <'        color: green;\n'>
                            <'        margin-left: 4em;\n'>
                            <'      }\n'>
                            <'      #home-link {\n'>
                            <'        text-align: right;\n'>
                            <'      }\n'>
                            <'    </style>\n'>
                            <'  </head>\n'>
                            <'  <body>\n'>
                            <'    <p id='>
                            <Id.Right_DoubleQuote '"'>
                            <home-link>
                            <Id.Right_DoubleQuote '"'>
                            <'>\n'>
                            <'      <a href='>
                            <Id.Right_DoubleQuote '"'>
                            <'/'>
                            <Id.Right_DoubleQuote '"'>
                            <'>oilshell.org</a>\n'>
                            <'    </p>\n'>
                          ]
                        )
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{<markdown>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {($ Id.VSub_DollarName '$src')}
                    )
                  ]
                  do_fork: T
                )
                (C {<_build-timestamp>})
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DLess '<<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_span_id: 519
                          stdin_parts: [<'  </body>\n'> <'</html>\n'>]
                        )
                    )
                  ]
                  do_fork: T
                )
              ]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {($ Id.VSub_DollarName '$out')}
                )
              ]
            )
          ]
        )
    )
    (C {<readonly>} {<Id.Lit_VarLike 'MONOSPACE='> (SQ <'font-family: monospace;'>)})
    (command.ShFunction
      name: install
      body: 
        (BraceGroup
          children: [
            (C {<markdown2html>} {<INSTALL.txt>} {<'_release/VERSION/doc/INSTALL.html'>} 
              {(DQ ($ Id.VSub_DollarName '$MONOSPACE'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: release-index
      body: 
        (BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'out='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: 
                    (suffix_op.Unary
                      tok: <Id.VTest_ColonHyphen ':-'>
                      arg_word: 
                        {<_build> <Id.Lit_Slash '/'> <doc> <Id.Lit_Slash '/'> <release-index.html>}
                    )
                )
              }
            )
            (C {<markdown2html>} {<'doc/release-index.md'>} {($ Id.VSub_DollarName '$out')} {(SQ )})
          ]
        )
    )
    (command.ShFunction
      name: _sed-ext
      body: 
        (BraceGroup
          children: [(C {<sed>} {<--regexp-extended>} {<-i>} {(DQ ($ Id.VSub_At '$@'))})]
        )
    )
    (command.ShFunction
      name: update-src-versions
      body: 
        (BraceGroup
          children: [
            (C {<_sed-ext>} 
              {
                (DQ <'s/Version [0-9]+.[0-9]+.[a-z0-9]+/Version '> 
                  ($ Id.VSub_DollarName '$OIL_VERSION') <'/g'>
                )
              } {<'doc/release-index.md'>}
            )
            (C {<_sed-ext>} 
              {
                (DQ <'s/oil-[0-9]+.[0-9]+.[a-z0-9]+/oil-'> ($ Id.VSub_DollarName '$OIL_VERSION') <'/g'>)
              } {<INSTALL.txt>}
            )
            (C {<_sed-ext>} 
              {
                (DQ <'s;/release/[0-9]+.[0-9]+.[a-z0-9]+/;/release/'> 
                  ($ Id.VSub_DollarName '$OIL_VERSION') <'/;g'>
                )
              } {<'doc/osh-quick-ref-toc.txt'>}
            )
          ]
        )
    )
    (C {(DQ ($ Id.VSub_At '$@'))})
  ]
)