(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:gpg_version)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                child: 
                  (command.Simple
                    words: [{<gpg>} {<--version>}]
                    redirects: [(redir op:<Id.Redir_GreatAnd '2>&'> loc:(redir_loc.Fd fd:2) arg:{<1>})]
                    do_fork: T
                  )
              )
            }
          spids: [4]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {<test>} {($ Id.VSub_QMark '$?')} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<127>})]
          action: [
            (command.Case
              to_match: {(DQ ($ Id.VSub_DollarName '$gpg_version'))}
              arms: [
                (case_arm
                  pat_list: [{(SQ <'gpg (GnuPG) 1.0.6'>) <Id.Lit_Star '*'>}]
                  action: [(C {<say>} {(DQ <'Your version of gpg (1.0.6) is too buggy for testing'>)})]
                  spids: [49 53 63 -1]
                )
                (case_arm
                  pat_list: [{<Id.Lit_Star '*'>}]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
                      children: [
                        (C {<mkdir>} {<'./gpghome'>})
                        (C {<chmod>} {<0700>} {<'./gpghome'>})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:GNUPGHOME)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_DollarParen '$('>
                                      child: (C {<pwd>})
                                    ) <'/gpghome'>
                                  )
                                }
                              spids: [150]
                            )
                          ]
                        )
                        (C {<export>} {<GNUPGHOME>})
                        (command.Simple
                          words: [
                            {<gpg>}
                            {<--homedir>}
                            {(DQ (${ Id.VSub_Name GNUPGHOME))}
                            {<--import>}
                            {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-gpg/keyring.gpg'>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.Simple
                          words: [
                            {<gpg>}
                            {<--homedir>}
                            {(DQ (${ Id.VSub_Name GNUPGHOME))}
                            {<--import-ownertrust>}
                            {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-gpg/ownertrust'>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_Great '2>'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<'/dev/null'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.Simple
                          words: [
                            {<gpg>}
                            {<--homedir>}
                            {(DQ (${ Id.VSub_Name GNUPGHOME))}
                            {<--sign>}
                            {<-u>}
                            {<committer> <Id.Lit_Splice '@example'> <.com>}
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {<'/dev/null'>}
                            )
                            (redir
                              op: <Id.Redir_Great '>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/dev/null'>}
                            )
                            (redir
                              op: <Id.Redir_GreatAnd '2>&'>
                              loc: (redir_loc.Fd fd:2)
                              arg: {<1>}
                            )
                          ]
                          do_fork: T
                        )
                        (C {<test_set_prereq>} {<GPG>})
                      ]
                    )
                  ]
                  spids: [66 67 255 -1]
                )
              ]
            )
          ]
          spids: [14 25]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {<test_have_prereq>} {<GPG>})
                (command.Pipeline
                  children: [
                    (C {<echo>})
                    (command.Simple
                      words: [
                        {<gpg>}
                        {<--homedir>}
                        {(DQ (${ Id.VSub_Name GNUPGHOME))}
                        {<-b>}
                        {<--rfc1991>}
                      ]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '>'>
                          loc: (redir_loc.Fd fd:1)
                          arg: {<'/dev/null'>}
                        )
                        (redir
                          op: <Id.Redir_GreatAnd '2>&'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<1>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  negated: F
                )
              ]
            )
          ]
          action: [(C {<test_set_prereq>} {<RFC1991>})]
          spids: [263 296]
        )
      ]
    )
    (command.ShFunction
      name: sanitize_pgp
      body: 
        (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'>
                )
              }
            )
          ]
        )
    )
  ]
)