From b0391ac0c9b8041c59d7aa8b2349bca1e0fbbb7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:09:04 +0200 Subject: [PATCH] BUGFIX: do not fail, if cache/ is missing Signed-off-by: Nico Schottelius --- bin/cdist-cache | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/cdist-cache b/bin/cdist-cache index bfb1a5b3..ee27ffb4 100755 --- a/bin/cdist-cache +++ b/bin/cdist-cache @@ -27,10 +27,12 @@ set -u __cdist_target_host="$1"; shift -__cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" # Create base to move into -mkdir -p "$(__cdist_cache_dir)" +mkdir -p "${__cdist_local_base_cache_dir}" + +# Now determine absolute path +__cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" __cdist_echo info "Saving cache to $__cdist_ddir " rm -rf "$__cdist_ddir"