diff options
author | Dustin Walker <dustin.walker@email.wsu.edu> | 2022-04-08 15:48:53 -0400 |
---|---|---|
committer | Dustin Walker <dustin.walker@email.wsu.edu> | 2022-04-08 15:48:53 -0400 |
commit | 1a7ad404ebe4ddcdb2a70b54693e126d2de3a166 (patch) | |
tree | 4452025459d110b3647c0e211fa350680a68edd9 | |
parent | 5834265dc2e480707c781311e55497e635f48898 (diff) |
rsync.sh help info
-rwxr-xr-x | rsync.sh | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,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 -rsync -rtvzP -e "ssh -p $2" ./ $1:~/www |