cdist/HACKERS_README
Nico Schottelius 20b50ea19f prepend new path, so running HACKERS_README in biased environment works
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
2011-03-08 12:18:26 +01:00

49 lines
1.3 KiB
Text
Executable file

cat << eof
Hey hackers,
this README is for you, for those who want to dig into cdist, hack it or try
to get a deeper understanding.
A lot of documentation is still missing, but running cdist-quickstart should
give you an impression of how cdist works.
I hope you have a lot of fun with cdist, because it was also a lot of fun to
develop it!
-- Nico, 20110304
## Conventions
- All variables exported by cdist are prefixed with a double underscore (__)
- All cdist-internal variables are prefixed with __cdist_ and are generally not exported.
## Running cdist when developing
This file is suitable for execution and saving the objects and
explorers from cdist. I usually do it like this:
% ./HACKERS_README
################################################################################
eof
set -x
# Tell the user what we do, so this script makes sense during execution
# prepare use (only from top level directory)
export PATH="$(pwd -P)/bin:$PATH"
export __cdist_conf_dir="$(pwd -P)/conf"
# Allow user to supply hostname
target="${1:-localhost}"
# And use hostname as basedir (dangerous, but hackers know what they do)
export __cdist_local_base_dir="/tmp/$target"
# Run the real script
cdist-deploy-to "$target"
# Display results
find "${__cdist_local_base_dir}"