(command.CommandList
  children: [
    (C {<Id.KW_Set set>} {<-o>} {<nounset>})
    (C {<Id.KW_Set set>} {<-o>} {<pipefail>})
    (C {<Id.KW_Set set>} {<-o>} {<errexit>})
    (C {<readonly>} 
      {<Id.Lit_VarLike 'OIL_VERSION='> 
        (command_sub
          left_token: <Id.Left_DollarParen '$('>
          command_list: 
            (command.CommandList
              children: [(C {<head>} {<-n>} {<1>} {<oil-version.txt>})]
            )
        )
      }
    )
    (C {<export>} {<OIL_VERSION>})
    (command.ShFunction
      name: log
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [{<echo>} {(DQ ($ Id.VSub_At '$@'))}]
              redirects: [(redir.Redir op:<Id.Redir_GreatAnd '1>&'> fd:1 arg_word:{<2>})]
            )
          ]
        )
    )
    (command.ShFunction
      name: _build-timestamp
      body: 
        (command.BraceGroup
          children: [
            (C {<echo>} {(SQ <'<hr/>'>)})
            (C {<echo>} 
              {
                (DQ <'<i>Generated on '> 
                  (command_sub
                    left_token: <Id.Left_DollarParen '$('>
                    command_list: (command.CommandList children:[(C {<date>})])
                  ) <'</i>'>
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: _quick-ref
      body: (command.BraceGroup children:[(C {<build/quick_ref.py>} {(DQ ($ Id.VSub_At '$@'))})])
    )
    (command.ShFunction
      name: x-quick-ref
      body: 
        (command.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')})
            (command.BraceGroup
              children: [
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir.HereDoc
                      op: <Id.Redir_DLess '<<'>
                      fd: -1
                      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'>
                      ]
                    )
                  ]
                )
                (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.HereDoc
                      op: <Id.Redir_DLess '<<'>
                      fd: -1
                      here_begin: {<EOF>}
                      here_end_span_id: 372
                      stdin_parts: [<'  </body>\n'> <'</html>\n'>]
                    )
                  ]
                )
              ]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_DollarName '$html_out')}
                )
              ]
            )
            (C {<log>} {(DQ <'Wrote '> ($ Id.VSub_DollarName '$html_out'))})
          ]
        )
    )
    (command.ShFunction
      name: osh-quick-ref
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'out_dir='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<_build>})
                )
              }
            )
            (C {<x-quick-ref>} {<osh>} {($ Id.VSub_DollarName '$out_dir')})
          ]
        )
    )
    (command.ShFunction
      name: markdown2html
      body: 
        (command.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 op_id:Id.VTest_ColonHyphen arg_word:{})
                )
              }
            )
            (C {<mkdir>} {<-p>} {<_build/doc>})
            (command.BraceGroup
              children: [
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir.HereDoc
                      op: <Id.Redir_DLess '<<'>
                      fd: -1
                      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'>
                      ]
                    )
                  ]
                )
                (command.Simple
                  words: [{<markdown>}]
                  redirects: [
                    (redir.Redir
                      op: <Id.Redir_Less '<'>
                      fd: -1
                      arg_word: {($ Id.VSub_DollarName '$src')}
                    )
                  ]
                )
                (C {<_build-timestamp>})
                (command.Simple
                  words: [{<cat>}]
                  redirects: [
                    (redir.HereDoc
                      op: <Id.Redir_DLess '<<'>
                      fd: -1
                      here_begin: {<EOF>}
                      here_end_span_id: 519
                      stdin_parts: [<'  </body>\n'> <'</html>\n'>]
                    )
                  ]
                )
              ]
              redirects: [
                (redir.Redir
                  op: <Id.Redir_Great '>'>
                  fd: -1
                  arg_word: {($ Id.VSub_DollarName '$out')}
                )
              ]
            )
          ]
        )
    )
    (C {<readonly>} {<Id.Lit_VarLike 'MONOSPACE='> (SQ <'font-family: monospace;'>)})
    (command.ShFunction
      name: install
      body: 
        (command.BraceGroup
          children: [
            (C {<markdown2html>} {<INSTALL.txt>} {<_release/VERSION/doc/INSTALL.html>} 
              {(DQ ($ Id.VSub_DollarName '$MONOSPACE'))}
            )
          ]
        )
    )
    (command.ShFunction
      name: release-index
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} 
              {<Id.Lit_VarLike 'out='> 
                (braced_var_sub
                  token: <Id.VSub_Number 1>
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: 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: 
        (command.BraceGroup
          children: [(C {<sed>} {<--regexp-extended>} {<-i>} {(DQ ($ Id.VSub_At '$@'))})]
        )
    )
    (command.ShFunction
      name: update-src-versions
      body: 
        (command.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 '$@'))})
  ]
)