My scripts for startup, dmenu, and the command line
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

25 lignes
424 B

  1. REMOTE_USER="immanuel"
  2. REMOTE_DIRECTORY="/home/immanuel/Dropoff/"
  3. LOCAL_DIR=$HOME/Dropoff
  4. pull () {
  5. rsync -aP "$REMOTE_USER@$1:$REMOTE_DIRECTORY " "$LOCAL_DIR"
  6. }
  7. push () {
  8. rsync -a "$LOCAL_DIR" "ssh://$REMOTE_USER@$1:$REMOTE_DIRECTORY"
  9. }
  10. while getopts a:u: option
  11. do
  12. case "${option}" in
  13. a) destination=$OPTARG
  14. echo $destination
  15. pull $destination;;
  16. u) destination=$OPTARG
  17. push $destination;;
  18. esac
  19. done