#!/bin/sh # # rsync - sync tilde to or from - 24.354.0529 - kapad`24 # basedir=/www/~tildelike/tilde.club cd $basedir || return 1 || exit 1 alias scp='rsync -pX -ar --info=name,remove,progress' # push: push(){ scp ./ tilde.club:~/. --delete \ --exclude=.ssh/ --exclude=.mail/ \ --exclude=logs/ } # pull: pull(){ scp tilde.club:~/ . --delete \ --exclude=.ssh/ } [ -z "$1" ] && { push; return $? || exit $?; } echo $* |grep -qw pull && { pull; return $? || exit $?; }