scripts

Random scripts
git clone git://git.margiolis.net/scripts.git
Log | Files | Refs | README | LICENSE

upd (586B)


      1 #!/bin/sh
      2 
      3 case "${1}" in
      4 	www)	src="${HOME}/src/margiolis.net/public/"
      5 		dst="master@margiolis.net:/var/www/htdocs/margiolis.net"
      6 		;;
      7 	ftp)	src="${2}"
      8 		dst="master@margiolis.net:/var/www/htdocs/ftp.margiolis.net/${3}"
      9 		;;
     10 	vps)	src="${2}"
     11 		dst="master@margiolis.net:${3}"
     12 		;;
     13 	lap)	src="${2}"
     14 		dst="tpad:${3}"
     15 		;;
     16 	desk)	src="${2}"
     17 		dst="pleb:${3}"
     18 		;;
     19 	*)	echo "usage: ${0##*/} {www | ftp | vps | lap | desk} src dst" 1>&2
     20 		exit 1
     21 		;;
     22 esac
     23 
     24 read -erp "${0##*/}: transfer '${src}' to '${dst}' (y/N)? " act
     25 test "${act}" = "y" && rsync -Purv --delete-after "${src}" "${dst}"