ensure cdist-type-emulator has __cdist_version set before and does not run git

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-03-04 09:15:18 +01:00
parent 1ee4647b28
commit 054cb7e611
3 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ scp -qr "${__cdist_src_base}"* \
# Adjust cdist-config to contain static version string
tmp_version="$__cdist_version"
sed "s/^\(__cdist_version=\).*/\1\"$tmp_version\"/" "$(which cdist-config)" | \
sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \
ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \
"cat > \"${__cdist_my_remote_out_dir}\"/cdist-config"

View file

@ -31,7 +31,7 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)"
__cdist_myname=${0##*/};
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
__cdist_version="$(cd "$__cdist_abs_mydir/.." && git describe)"
: ${__cdist_version:="$(cd "$__cdist_abs_mydir/.." && git describe)"}
################################################################################
# Names / Constants

View file

@ -34,7 +34,7 @@ __cdist_output_dir="$1"; shift
__cdist_work_dir="$__cdist_local_base_dir"
# Export information for cdist-type-emulator
export __cdist_conf_dir __cdist_output_dir __cdist_manifest
export __cdist_conf_dir __cdist_output_dir __cdist_manifest __cdist_version
# Export information for manifests
export __global="$__cdist_out_dir"