(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:name)
          op: assign_op.Equal
          rhs: {(DQ (syncdropbox))}
          spids: [16]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:dropbox)
          op: assign_op.Equal
          rhs: {(DQ ($ Id.VSub_DollarName '$HOME') (/Dropbox))}
          spids: [21]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:sourcedir)
          op: assign_op.Equal
          rhs: {(DQ )}
          spids: [27]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:targetdir)
          op: assign_op.Equal
          rhs: {(DQ (sync))}
          spids: [31]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {($ Id.VSub_Pound '$#')} {(-eq)} {(0)} {(Id.Lit_RBracket ']')})
              terminator: (Token id:Id.Op_Semi val:';' span_id:56)
            )
          ]
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [
                    {(echo)}
                    {
                      (DQ ('Usage: ') ($ Id.VSub_Number '$0') 
                        (' [-d source-folder] {file, file, file}')
                      )
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:69)
                      fd: -1
                      arg_word: {(2)}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:72)
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:74)
              arg_word: {(1)}
            )
          ]
          spids: [44 58]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} 
                  {(DQ (-d))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:98)
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:sourcedir)
                  op: assign_op.Equal
                  rhs: {(DQ ($ Id.VSub_Number '$2'))}
                  spids: [103]
                )
              ]
            )
            (command.Sentence
              child: (C {(shift)})
              terminator: (Token id:Id.Op_Semi val:';' span_id:110)
            )
            (C {(shift)})
          ]
          spids: [82 100]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                  {(DQ ($ Id.VSub_DollarName '$sourcedir'))} {(-a)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:143)
            )
          ]
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [
                    {(echo)}
                    {
                      (DQ ($ Id.VSub_DollarName '$name') 
                        (": you can't specify both a directory and specific files.")
                      )
                    }
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:155)
                      fd: -1
                      arg_word: {(2)}
                    )
                  ]
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:158)
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:160)
              arg_word: {(1)}
            )
          ]
          spids: [121 145]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                  {(DQ ($ Id.VSub_DollarName '$sourcedir'))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:181)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} 
                          {(DQ ($ Id.VSub_DollarName '$sourcedir'))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:200)
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [
                            {(echo)}
                            {
                              (DQ ($ Id.VSub_DollarName '$name') 
                                (': please specify a source directory with -d')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:212)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:215)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:217)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [186 202]
                )
              ]
            )
          ]
          spids: [167 183]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-z)} 
                  {(DQ ($ Id.VSub_DollarName '$sourcedir'))} {(Id.Lit_RBracket ']')}
                )
              terminator: (Token id:Id.Op_Semi val:';' span_id:245)
            )
          ]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(-f)} 
                          {
                            (DQ ($ Id.VSub_DollarName '$dropbox') (/) 
                              ($ Id.VSub_DollarName '$sourcedir')
                            )
                          } {(-o)} {(-d)} {(DQ ($ Id.VSub_DollarName '$dropbox') (/) ($ Id.VSub_DollarName '$sourcedir'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:274)
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [
                            {(echo)}
                            {
                              (DQ ($ Id.VSub_DollarName '$name') (': specified source directory ') 
                                ($ Id.VSub_DollarName '$sourcedir') (' already exists in ') ($ Id.VSub_DollarName '$dropbox')
                              )
                            }
                          ]
                          redirects: [
                            (redir.Redir
                              op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:289)
                              fd: -1
                              arg_word: {(2)}
                            )
                          ]
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:292)
                    )
                    (command.ControlFlow
                      token: (Token id:Id.ControlFlow_Exit val:exit span_id:294)
                      arg_word: {(1)}
                    )
                  ]
                  spids: [250 276]
                )
              ]
            )
            (C {(echo)} 
              {
                (DQ ('Copying contents of ') ($ Id.VSub_DollarName '$sourcedir') (' to ') 
                  ($ Id.VSub_DollarName '$dropbox') (...)
                )
              }
            )
            (C {(cp)} {(-a)} {(DQ ($ Id.VSub_DollarName '$sourcedir'))} 
              {($ Id.VSub_DollarName '$dropbox')}
            )
          ]
          spids: [231 247]
        )
      ]
      else_action: [
        (command.If
          arms: [
            (if_arm
              cond: [
                (command.Sentence
                  child: 
                    (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} 
                      {(DQ ($ Id.VSub_DollarName '$dropbox') (/) ($ Id.VSub_DollarName '$targetdir'))} {(Id.Lit_RBracket ']')}
                    )
                  terminator: (Token id:Id.Op_Semi val:';' span_id:350)
                )
              ]
              action: [
                (C {(mkdir)} 
                  {(DQ ($ Id.VSub_DollarName '$dropbox') (/) ($ Id.VSub_DollarName '$targetdir'))}
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: [
                        (command.Sentence
                          child: 
                            (C {(Id.Lit_LBracket '[')} {($ Id.VSub_QMark '$?')} {(-ne)} {(0)} 
                              {(Id.Lit_RBracket ']')}
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:376)
                        )
                      ]
                      action: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              words: [
                                {(echo)}
                                {
                                  (DQ ($ Id.VSub_DollarName '$name') 
                                    (': Error encountered during mkdir ') ($ Id.VSub_DollarName '$dropbox') (/) ($ Id.VSub_DollarName '$targetdir')
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:391)
                                  fd: -1
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          terminator: (Token id:Id.Op_Semi val:';' span_id:394)
                        )
                        (command.ControlFlow
                          token: (Token id:Id.ControlFlow_Exit val:exit span_id:396)
                          arg_word: {(1)}
                        )
                      ]
                      spids: [364 378]
                    )
                  ]
                )
              ]
              spids: [334 352]
            )
          ]
        )
        (C {(cp)} {(-p)} {(-v)} {($ Id.VSub_At '$@')} 
          {(DQ ($ Id.VSub_DollarName '$dropbox') (/) ($ Id.VSub_DollarName '$targetdir'))}
        )
      ]
    )
    (C {(exec)} {(startdropbox)} {(-s)})
  ]
)