load __cdist_dir from core
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
630fced69d
commit
abe6e695bc
2 changed files with 39 additions and 22 deletions
|
@ -111,6 +111,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX")
|
|||
: ${__cdist_local_base_cache_dir:=$__cdist_abs_mydir/../$__cdist_name_cache}
|
||||
|
||||
: ${__cdist_conf_dir:="$(cd "$__cdist_abs_mydir/../conf" && pwd -P)"}
|
||||
: ${__cdist_core_dir:="$(cd "$__cdist_abs_mydir/../core" && pwd -P)"}
|
||||
|
||||
: ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer}
|
||||
: ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest}
|
||||
|
@ -149,6 +150,15 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX")
|
|||
################################################################################
|
||||
# Internal functions
|
||||
#
|
||||
|
||||
# *NEW* Load functions from library
|
||||
for __cdist_lib in $__cdist_core_dir/*; do
|
||||
echo Loading $__cdist_lib ...
|
||||
. "$__cdist_lib"
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
__cdist_echo()
|
||||
{
|
||||
__cdist_echo_type="$1"; shift
|
||||
|
@ -208,6 +218,11 @@ __cdist_usage()
|
|||
__cdist_exit_err "$__cdist_myname: $@"
|
||||
}
|
||||
|
||||
___cdist_lib_path()
|
||||
{
|
||||
echo $_
|
||||
}
|
||||
|
||||
__cdist_init_deploy()
|
||||
{
|
||||
__cdist_echo info "Creating clean directory structure "
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
#
|
||||
|
||||
|
||||
. cdist-config
|
||||
__cdist_dir()
|
||||
{
|
||||
[ $# -eq 4 ] || __cdist_usage "<push|pull> <target host> <src dir> <dst dir>"
|
||||
set -ue
|
||||
|
||||
|
@ -49,3 +50,4 @@ elif [ "$__cdist_action" = "pull" ]; then
|
|||
else
|
||||
__cdist_exit_err "Unknown action $__cdist_action"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue