blob: 7ceb4d1eaf65c7c11b4635ccefc0c035be15a6c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/bin/sh
# rsync.sh
# Quick script to rsync web files to their webserver with the specified port.
# If we have no arguments, or the second argument is not a positive integer (drop failure output).
if [ $# -eq 0 ] || ! [ $2 -gt 0 ] 2>/dev/null; then
echo "usage: rsync.sh <user@url> <port>"
else
rsync -rtvzP -e "ssh -p $2" ./ $1:/var/tmp/www
fi
|