(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:TF_PREFIX)
          op: assign_op.Equal
          rhs: {(SQ (Token id:Id.Lit_Chars val:/usr/local span_id:48))}
          spids: [46]
        )
      ]
    )
    (command.ShFunction
      name: usage
      body: 
        (command.BraceGroup
          children: [
            (C {(echo)} {(DQ ('Usage: ') ($ Id.VSub_Number '$0') (' OPTIONS'))})
            (C {(echo)} {(-e)} 
              {
                (DQ ('-p, --prefix') (Id.Lit_Other '\\') 
                  ('tset installation prefix (default: /usr/local)')
                )
              }
            )
            (C {(echo)} {(-e)} {(DQ ('-v, --version') (Id.Lit_Other '\\') ('tset TensorFlow version'))})
            (C {(echo)} {(-e)} {(DQ ('-h, --help') (Id.Lit_Other '\\') ('tdisplay this message'))})
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp Id.Op_DAmp]
      children: [
        (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(Id.Lit_Equals '=') (Id.Lit_Equals '=')} 
          {(0)} {(Id.Lit_RBracket ']')}
        )
        (C {(usage)})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:120)
          arg_word: {(0)}
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ARGS)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:129)
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(getopt)} {(-o)} {(p) (Id.Lit_Other ':') (v) (Id.Lit_Other ':') (h)} {(--long)} 
                        {(prefix) (Id.Lit_Other ':') (Id.Lit_Comma ',') (version) (Id.Lit_Other ':') 
                          (Id.Lit_Comma ',') (help)
                        } {(-n)} {($ Id.VSub_Number '$0')} {(--)} {(DQ ($ Id.VSub_At '$@'))}
                      )
                    ]
                  )
              )
            }
          spids: [128]
        )
      ]
    )
    (C {(eval)} {(Id.KW_Set set)} {(--)} {(DQ ($ Id.VSub_DollarName '$ARGS'))})
    (command.WhileUntil
      keyword: (Token id:Id.KW_While val:while span_id:175)
      cond: [
        (command.Sentence
          child: (C {(true)})
          terminator: (Token id:Id.Op_Semi val:';' span_id:179)
        )
      ]
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(-h)} {(--help)}]
                  action: [
                    (command.Sentence
                      child: (C {(usage)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:200)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:202)
                    )
                  ]
                  spids: [193 196 204 -1]
                )
                (case_arm
                  pat_list: [{(-p)} {(--prefix)}]
                  action: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_Number '$2'))}
                      arms: [
                        (case_arm
                          pat_list: [{(DQ )}]
                          action: [(C {(shift)} {(2)})]
                          spids: [222 224 230 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:TF_PREFIX)
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_Number '$2')}
                                      spids: [236]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:239)
                            )
                            (C {(shift)} {(2)})
                          ]
                          spids: [233 234 245 -1]
                        )
                      ]
                    )
                  ]
                  spids: [207 210 250 -1]
                )
                (case_arm
                  pat_list: [{(-v)} {(--version)}]
                  action: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_Number '$2'))}
                      arms: [
                        (case_arm
                          pat_list: [{(DQ )}]
                          action: [(C {(shift)} {(2)})]
                          spids: [268 270 276 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (command.Sentence
                              child: 
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:TF_VERSION)
                                      op: assign_op.Equal
                                      rhs: {($ Id.VSub_Number '$2')}
                                      spids: [282]
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:285)
                            )
                            (C {(shift)} {(2)})
                          ]
                          spids: [279 280 291 -1]
                        )
                      ]
                    )
                  ]
                  spids: [253 256 296 -1]
                )
                (case_arm
                  pat_list: [{(--)}]
                  action: [
                    (command.Sentence
                      child: (C {(shift)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:304)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Break val:break span_id:306)
                    )
                  ]
                  spids: [299 300 308 -1]
                )
                (case_arm
                  pat_list: [{(Id.Lit_Star '*')}]
                  action: [
                    (command.Sentence
                      child: 
                        (C {(echo)} 
                          {
                            (DQ ("Internal error! Try '") ($ Id.VSub_Number '$0') 
                              (" --help' for more information.")
                            )
                          }
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:322)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:324)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [311 312 328 -1]
                )
              ]
            )
          ]
        )
    )
    (command.AndOr
      ops: [Id.Op_DAmp Id.Op_DAmp]
      children: [
        (C {(Id.Lit_LBracket '[')} {(-z)} {($ Id.VSub_DollarName '$TF_VERSION')} {(Id.Lit_RBracket ']')})
        (C {(echo)} {(DQ ('Specify a version using -v or --version'))})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:354)
          arg_word: {(1)}
        )
      ]
    )
    (C {(echo)} 
      {
        (DQ ('Generating pkgconfig file for TensorFlow ') ($ Id.VSub_DollarName '$TF_VERSION') (' in ') 
          ($ Id.VSub_DollarName '$TF_PREFIX')
        )
      }
    )
    (command.Simple
      words: [{(cat)}]
      redirects: [
        (redir.HereDoc
          op: (Token id:Id.Redir_DLess val:'<<' span_id:371)
          fd: -1
          here_begin: {(EOF)}
          here_end_span_id: 409
          stdin_parts: [
            ('prefix=')
            (${ Id.VSub_Name TF_PREFIX)
            ('\n')
            ('exec_prefix=')
            (word_part.EscapedLiteral
              token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:385)
            )
            ('{prefix}\n')
            ('libdir=')
            (word_part.EscapedLiteral
              token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:388)
            )
            ('{exec_prefix}/lib\n')
            ('includedir=')
            (word_part.EscapedLiteral
              token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:391)
            )
            ('{prefix}/include\n')
            ('\n')
            ('Name: TensorFlow\n')
            ('Version: ')
            (${ Id.VSub_Name TF_VERSION)
            ('\n')
            (
'Description: Library for computation using data flow graphs for scalable machine learning\n'
            )
            ('Requires:\n')
            ('Libs: -L')
            (word_part.EscapedLiteral
              token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:403)
            )
            ('{libdir} -ltensorflow\n')
            ('Cflags: -I')
            (word_part.EscapedLiteral
              token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:406)
            )
            ('{includedir}\n')
          ]
        )
        (redir.Redir
          op: (Token id:Id.Redir_Great val:'>' span_id:375)
          fd: -1
          arg_word: {(tensorflow.pc)}
        )
      ]
    )
  ]
)