blob: 5bfb520a87342182d91293bf154c2ac7ae2abdf6 (
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:~/www
fi
|