wall.sh (438B)
1 #!/bin/sh 2 [ -z "$HOME" ] && HOME=/home 3 [ -z "$XDG_PICTURES" ] && xdg-user-dirs-update || XDG_PICTURES=$HOME/Pictures 4 case $1 in 5 push) 6 rsync -urv $XDG_PICTURES/ tetraonini@10.0.0.200:Pictures 7 ;; 8 pull) 9 rsync -urv tetraonini@10.0.0.200:Pictures/ $XDG_PICTURES 10 ;; 11 *) 12 echo "Not a real argument :clown_face:" 13 echo "\t pull - pulls & updates the local files" 14 echo "\t push - copies local to server" 15 ;; 16 esac