(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:storage) op:Equal rhs:{(gcs)} spids:[54])]
      spids: [54]
    )
    (C {(read)} {(-p)} {(DQ ("Backup Storage (file, gcs) [gcs]: "))})
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$REPLY"))} {(Lit_Other "]")})
              terminator: <Op_Semi ";">
            )
          ]
          action: [
            (Sentence
              child: 
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:storage)
                      op: Equal
                      rhs: {(DQ ($ VSub_Name "$REPLY"))}
                      spids: [80]
                    )
                  ]
                  spids: [80]
                )
              terminator: <Op_Semi ";">
            )
          ]
          spids: [-1 78]
        )
      ]
      spids: [-1 86]
    )
    (Case
      to_match: {(DQ ($ VSub_Name "$storage"))}
      arms: [
        (case_arm
          pat_list: [{(gcs)}]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:project)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(gcloud)} {(config)} {(list)} {(project)})
                                  (C {(grep)} {(SQ <"project\\s*=">)})
                                  (C {(sed)} {(-r)} {(SQ <"s/^.*=\\s*(.*)$/\\1/">)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [106 132]
                      )
                    }
                  spids: [105]
                )
              ]
              spids: [105]
            )
            (C {(read)} {(-p)} 
              {(DQ ("Google Developers Console Project [") ($ VSub_Name "$project") ("]: "))}
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-n)} {(DQ ($ VSub_Name "$REPLY"))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Sentence
                      child: 
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:project)
                              op: Equal
                              rhs: {(DQ ($ VSub_Name "$REPLY"))}
                              spids: [161]
                            )
                          ]
                          spids: [161]
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  spids: [-1 159]
                )
              ]
              spids: [-1 167]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$project"))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ("ERROR: Project name must not be empty."))})
                    (C {(exit)} {(1)})
                  ]
                  spids: [-1 183]
                )
              ]
              spids: [-1 198]
            )
            (C {(read)} {(-p)} {(DQ ("Google Cloud Storage bucket for Vitess backups: "))} {(bucket)})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$bucket"))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ("ERROR: Bucket name must not be empty."))})
                    (C {(exit)} {(1)})
                  ]
                  spids: [-1 226]
                )
              ]
              spids: [-1 241]
            )
            (C {(echo)})
            (C {(echo)} 
              {(DQ ("NOTE: If you haven't already created this bucket, you can do so by running:"))}
            )
            (C {(echo)} {(DQ ("      gsutil mb gs://") ($ VSub_Name "$bucket"))})
            (C {(echo)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:backup_flags)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(echo)} {(-backup_storage_implementation)} {(gcs)} 
                                {(-gcs_backup_storage_project)} {(DQ ("'") ($ VSub_Name "$project") ("'"))} {(-gcs_backup_storage_bucket)} 
                                {(DQ ("'") ($ VSub_Name "$bucket") ("'"))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [267 293]
                      )
                    }
                  spids: [266]
                )
              ]
              spids: [266]
            )
          ]
          spids: [97 98 296 -1]
        )
        (case_arm
          pat_list: [{(file)}]
          action: [
            (C {(read)} {(-p)} {(DQ ("Root directory for backups (usually an NFS mount): "))} 
              {(file_root)}
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$file_root"))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(echo)} {(DQ ("ERROR: Root directory must not be empty."))})
                    (C {(exit)} {(1)})
                  ]
                  spids: [-1 330]
                )
              ]
              spids: [-1 345]
            )
            (C {(echo)})
            (C {(echo)} {(DQ ("NOTE: You must add your NFS mount to the vtctld-controller-template"))})
            (C {(echo)} {(DQ ("      and vttablet-pod-template as described in the Kubernetes docs:"))})
            (C {(echo)} {(DQ ("      http://kubernetes.io/v1.0/docs/user-guide/volumes.html#nfs"))})
            (C {(echo)})
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:backup_flags)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(echo)} {(-backup_storage_implementation)} {(file)} 
                                {(-file_backup_storage_root)} {(DQ ("'") ($ VSub_Name "$file_root") ("'"))}
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [377 393]
                      )
                    }
                  spids: [376]
                )
              ]
              spids: [376]
            )
          ]
          spids: [298 299 396 -1]
        )
        (case_arm
          pat_list: [{(Lit_Other "*")}]
          action: [
            (C {(echo)} 
              {(DQ ("ERROR: Unsupported backup storage implementation: ") ($ VSub_Name "$storage"))}
            )
            (C {(exit)} {(1)})
          ]
          spids: [398 399 -1 414]
        )
      ]
      spids: [89 95 414]
    )
    (C {(echo)} {(DQ ("Saving config.sh..."))})
    (SimpleCommand
      words: [
        {(echo)}
        {
          (DQ ("backup_flags=") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">) 
            ($ VSub_Name "$backup_flags") (EscapedLiteralPart token:<Lit_EscapedChar "\\\"">)
          )
        }
      ]
      redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(config.sh)} spids:[432])]
    )
  ]
)