summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2018-04-24 19:54:01 +0200
committertv <tv@krebsco.de>2018-04-24 19:54:01 +0200
commit3022582ade8049e6ccf18f358cedb996d6716945 (patch)
tree8dd64197294439918a3937b63f6206e8452b1b6f
parente89cf20d4310070a877c2e24a287659546b561c9 (diff)
populate: support rsyncing files
-rwxr-xr-xpkgs/populate/populate.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/populate/populate.sh b/pkgs/populate/populate.sh
index 670d25b..9627fb7 100755
--- a/pkgs/populate/populate.sh
+++ b/pkgs/populate/populate.sh
@@ -132,10 +132,14 @@ populate_file() {(
file_target=$target_user@$target_host:$target_path/$file_name
fi
+ if test -d "$file_path"; then
+ file_path=$file_path/
+ fi
+
rsync \
-vFrlptD \
--delete-excluded \
- "$file_path"/ \
+ "$file_path" \
-e "ssh -o ControlPersist=no -p $target_port" \
"$file_target"
)}