Allow passing of extra arguments to rsync

This commit is contained in:
Chris Hawes
2017-01-10 21:49:45 +00:00
parent 465d4cae85
commit b7070bec42
2 changed files with 8 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ docker run --rm \
-e PLUGIN_HOSTS="127.0.0.1" \
-e PLUGIN_TARGET="./" \
-e PLUGIN_SCRIPT="echo \"Done!\"" \
-e PLUGIN_ARGS="--blocking-io" \
-v $(pwd):$(pwd) \
-w $(pwd) \
drillster/drone-rsync

View File

@@ -41,8 +41,14 @@ if [ -z "$RSYNC_KEY" ]; then
SSH_KEY=$PLUGIN_KEY
fi
if [ -z "$PLUGIN_ARGS" ]; then
ARGS=
else
ARGS=$PLUGIN_ARGS
fi
# Building rsync command
expr="rsync -az"
expr="rsync -az $ARGS"
if [[ -n "$PLUGIN_RECURSIVE" && "$PLUGIN_RECURSIVE" == "true" ]]; then
expr="$expr -r"