../bin/cdist-cache -> __cdist_cache
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
0fa95a5adc
commit
7050342d90
1 changed files with 11 additions and 16 deletions
|
@ -18,22 +18,17 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# Let's build a cconfig tree from a configuration
|
||||
# And save it into the cache tree
|
||||
# Save the configuration tree into the local cache
|
||||
#
|
||||
|
||||
. cdist-config
|
||||
[ $# -eq 1 ] || __cdist_usage "<target host>"
|
||||
set -u
|
||||
|
||||
__cdist_target_host="$1"; shift
|
||||
|
||||
__cdist_cache()
|
||||
{
|
||||
# Create base to move into
|
||||
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"
|
||||
mv "$__cdist_local_base_dir" "$__cdist_ddir"
|
||||
__cdist_echo info \
|
||||
"Saving cache to $(__cdist_host_cache_dir "$__cdist_target_host")"
|
||||
rm -rf "$(__cdist_host_cache_dir "$__cdist_target_host")"
|
||||
mv "$__cdist_local_base_dir" \
|
||||
"$(__cdist_host_cache_dir "$__cdist_target_host")"
|
||||
}
|
Loading…
Reference in a new issue