20 lines
420 B
Text
20 lines
420 B
Text
|
#!/usr/bin/env sh
|
||
|
|
||
|
## args
|
||
|
|
||
|
if [ $# -ge 1 ] ; then source_dir=$1 && shift ; else source_dir="/tmp/portal" ; fi
|
||
|
if [ $# -ge 1 ] ; then target_sys=$1 && shift ; else target_sys="gs-ansible-test-user" ; fi
|
||
|
if [ $# -ge 1 ] ; then target_dir=$1 && shift ; else target_dir="/tmp/portal" ; fi
|
||
|
|
||
|
|
||
|
## exec
|
||
|
|
||
|
rsync \
|
||
|
--recursive \
|
||
|
--verbose \
|
||
|
--exclude="data.json" \
|
||
|
--rsh=ssh \
|
||
|
${source_dir}/* \
|
||
|
${target_sys}:${target_dir}
|
||
|
|