(command.CommandList
  children: [
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:gpg_version)
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (command.SimpleCommand
                        words: [{(gpg)} {(--version)}]
                        redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})]
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
              )
            }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {($ VSub_QMark '$?')} {(KW_Bang '!') (Lit_Other '=')} {(127)})]
          action: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$gpg_version'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ <'gpg (GnuPG) 1.0.6'>) (Lit_Other '*')}]
                  action: [(C {(say)} {(DQ ('Your version of gpg (1.0.6) is too buggy for testing'))})]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp Op_DAmp]
                      children: [
                        (C {(mkdir)} {(./gpghome)})
                        (C {(chmod)} {(0700)} {(./gpghome)})
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:GNUPGHOME)
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (word_part.CommandSubPart
                                      command_list: (command.CommandList children:[(C {(pwd)})])
                                      left_token: <Left_CommandSub '$('>
                                    ) (/gpghome)
                                  )
                                }
                            )
                          ]
                        )
                        (C {(export)} {(GNUPGHOME)})
                        (command.SimpleCommand
                          words: [
                            {(gpg)}
                            {(--homedir)}
                            {(DQ (${ VSub_Name GNUPGHOME))}
                            {(--import)}
                            {(DQ ($ VSub_DollarName '$TEST_DIRECTORY')) (/lib-gpg/keyring.gpg)}
                          ]
                          redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                        )
                        (command.SimpleCommand
                          words: [
                            {(gpg)}
                            {(--homedir)}
                            {(DQ (${ VSub_Name GNUPGHOME))}
                            {(--import-ownertrust)}
                            {(DQ ($ VSub_DollarName '$TEST_DIRECTORY')) (/lib-gpg/ownertrust)}
                          ]
                          redirects: [(redir.Redir op:<Redir_Great '2>'> fd:2 arg_word:{(/dev/null)})]
                        )
                        (command.SimpleCommand
                          words: [
                            {(gpg)}
                            {(--homedir)}
                            {(DQ (${ VSub_Name GNUPGHOME))}
                            {(--sign)}
                            {(-u)}
                            {(committer) (Lit_Other '@') (example.com)}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Less '<'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: <Redir_GreatAnd '2>&'>
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                        (C {(test_set_prereq)} {(GPG)})
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(test_have_prereq)} {(GPG)})
                (command.Pipeline
                  children: [
                    (C {(echo)})
                    (command.SimpleCommand
                      words: [{(gpg)} {(--homedir)} {(DQ (${ VSub_Name GNUPGHOME))} {(-b)} {(--rfc1991)}]
                      redirects: [
                        (redir.Redir
                          op: <Redir_Great '>'>
                          fd: 16777215
                          arg_word: {(/dev/null)}
                        )
                        (redir.Redir
                          op: <Redir_GreatAnd '2>&'>
                          fd: 2
                          arg_word: {(1)}
                        )
                      ]
                    )
                  ]
                  negated: F
                )
              ]
            )
          ]
          action: [(C {(test_set_prereq)} {(RFC1991)})]
        )
      ]
    )
    (command.FuncDef
      name: sanitize_pgp
      body: 
        (command.BraceGroup
          children: [
            (C {(perl)} {(-ne)} 
              {
                (SQ <'\n'> <'\t\t/^-----END PGP/ and $in_pgp = 0;\n'> <'\t\tprint unless $in_pgp;\n'> 
                  <'\t\t/^-----BEGIN PGP/ and $in_pgp = 1;\n'> <'\t'>
                )
              }
            )
          ]
        )
    )
  ]
)