From 1a7ad404ebe4ddcdb2a70b54693e126d2de3a166 Mon Sep 17 00:00:00 2001 From: Dustin Walker Date: Fri, 8 Apr 2022 15:48:53 -0400 Subject: rsync.sh help info --- rsync.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'rsync.sh') diff --git a/rsync.sh b/rsync.sh index 5698091..5bfb520 100755 --- a/rsync.sh +++ b/rsync.sh @@ -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 " +else + rsync -rtvzP -e "ssh -p $2" ./ $1:~/www +fi -rsync -rtvzP -e "ssh -p $2" ./ $1:~/www -- cgit v1.2.3