(command.CommandList
  children: [
    (command.Simple
      words: [
        {<curl>}
        {<-s>}
        {<https> <Id.Lit_Other ':'> 
          <//repo1.maven.org/maven2/org/apache/rat/apache-rat/0.12/apache-rat-0.12.jar>
        }
      ]
      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<apache-rat-0.12.jar>})]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RAT)
          op: assign_op.Equal
          rhs: {(DQ <'java -jar apache-rat-0.12.jar -x '>)}
          spids: [74]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RELEASE_DIR)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_DollarParen '$('>
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Sentence
                        child: 
                          (C {<cd>} 
                            {
                              (DQ 
                                (command_sub
                                  left_token: <Id.Left_DollarParen '$('>
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (C {<dirname>} {(DQ ($ Id.VSub_DollarName '$BASH_SOURCE'))})
                                      ]
                                    )
                                )
                              )
                            }
                          )
                        terminator: <Id.Op_Semi _>
                      )
                      (C {<pwd>})
                    ]
                  )
              )
            }
          spids: [80]
        )
      ]
    )
    (command.Simple
      words: [{($ Id.VSub_DollarName '$RAT')} {($ Id.VSub_Number '$1')}]
      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<rat.txt>})]
    )
    (command.Simple
      words: [
        {<python>}
        {($ Id.VSub_DollarName '$RELEASE_DIR') </check-rat-report.py>}
        {($ Id.VSub_DollarName '$RELEASE_DIR') </rat_exclude_files.txt>}
        {<rat.txt>}
      ]
      redirects: [(redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{<filtered_rat.txt>})]
    )
    (C {<cat>} {<filtered_rat.txt>})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:UNAPPROVED)
          op: assign_op.Equal
          rhs: 
            {
              (command_sub
                left_token: <Id.Left_Backtick '`'>
                command_list: 
                  (command.CommandList
                    children: [
                      (command.Pipeline
                        children: [
                          (C {<cat>} {<filtered_rat.txt>})
                          (C {<grep>} {(DQ <'NOT APPROVED'>)})
                          (C {<wc>} {<-l>})
                        ]
                        negated: F
                      )
                    ]
                  )
              )
            }
          spids: [128]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {<Id.Lit_LBracket '['>} {(DQ <0>)} {<-eq>} {(DQ (${ Id.VSub_Name UNAPPROVED))} 
                  {<Id.Lit_RBracket ']'>}
                )
              terminator: <Id.Op_Semi _>
            )
          ]
          action: [(C {<echo>} {(DQ <'No unapproved licenses'>)})]
          spids: [152 171]
        )
      ]
      else_action: [
        (C {<echo>} 
          {(DQ (${ Id.VSub_Name UNAPPROVED) <' unapproved licences. Check rat report: rat.txt'>)}
        )
        (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>})
      ]
    )
  ]
)