Advertisement
Guest User

grouse

a guest
Jun 2nd, 2008
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.39 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. # examples:
  4. # dropoff
  5. # ~/.pickup/* -> .
  6.  
  7. # dropoff server
  8. # server:~/.pickup/* -> .
  9.  
  10. # dropoff server target
  11. # server:~/.pickup/* -> target
  12.  
  13. # XXX: warning, will not work if $PICKUPDIR is set differently on other system
  14.  
  15. _PICKUPDIR="~/.pickup"
  16.  
  17. if [ $1 ]; then
  18.     scp -r "${1}:${_PICKUPDIR}/*" "${2:-.}"
  19. else
  20.     cp --dereference -prv "${_PICKUPDIR}/*" .
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement