(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: <Id.Op_Semi _>
            )
          ]
          action: [
            (command.Sentence
              child: 
                (command.Simple
                  words: [
                    {<echo>}
                    {
                      (DQ <'Usage: '> ($ Id.VSub_Number '$0') 
                        <' [-d source-folder] {file, file, file}'>
                      )
                    }
                  ]
                  redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> 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: <Id.Op_Semi _>
            )
          ]
          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:<Id.Op_Semi _>)
            (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: <Id.Op_Semi _>
            )
          ]
          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 op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
                  do_fork: T
                )
              terminator: <Id.Op_Semi _>
            )
            (command.ControlFlow token:<Id.ControlFlow_Exit exit> 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: <Id.Op_Semi _>
            )
          ]
          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: <Id.Op_Semi _>
                    )
                  ]
                  action: [
                    (command.Sentence
                      child: 
                        (command.Simple
                          words: [
                            {<echo>}
                            {
                              (DQ ($ Id.VSub_DollarName '$name') 
                                <': please specify a source directory with -d'>
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_GreatAnd '>&'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<2>}
                            )
                          ]
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      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: <Id.Op_Semi _>
            )
          ]
          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: <Id.Op_Semi _>
                    )
                  ]
                  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
                              op: <Id.Redir_GreatAnd '>&'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<2>}
                            )
                          ]
                          do_fork: T
                        )
                      terminator: <Id.Op_Semi _>
                    )
                    (command.ControlFlow
                      token: <Id.ControlFlow_Exit exit>
                      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: <Id.Op_Semi _>
                )
              ]
              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: <Id.Op_Semi _>
                        )
                      ]
                      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
                                  op: <Id.Redir_GreatAnd '>&'>
                                  loc: (redir_loc.Fd fd:1)
                                  arg: {<2>}
                                )
                              ]
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Exit exit>
                          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>})
  ]
)