a giant commit into the future

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-02-23 16:45:38 +01:00
commit 995bf8d963
6 changed files with 52 additions and 46 deletions

View file

@ -24,25 +24,18 @@
. cdist-config
if [ $# -lt 5 ]; then
__cdist_usage "<target host> <local srcdir> <local dstdir> <remote srcdir> <remote dstdir> [explorer args]"
if [ $# -lt 3 ]; then
__cdist_usage "<target host> <remote srcdir> <remote dstdir> [explorer args]"
fi
set -ue
__cdist_target_host="$1"; shift
__cdist_local_src_dir="$1"; shift
__cdist_local_dst_dir="$1"; shift
__cdist_remote_src_dir="$1"; shift
__cdist_remote_dst_dir="$1"; shift
# Create remote source and destination directory
# Create remote destination directory
ssh "${__cdist_remote_user}@${__cdist_target_host}" \
"mkdir -p \"${__cdist_remote_src_dir}\" \
\"${__cdist_remote_dst_dir}\""
# Ensure local destination directory exists
mkdir -p "$__cdist_local_dst_dir"
"mkdir -p \"${__cdist_remote_dst_dir}\""
# FIXME: enable -q as soon as the code is cleaned up
cd "${__cdist_local_src_dir}"
@ -53,9 +46,6 @@ if [ "$num" -lt 1 ]; then
__cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers"
fi
# Copy all explorers to remote source directory
scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}"
# Execute all explorers
for explorer in *; do
if [ -f "$explorer" ]; then