make cdist-env usable standalone (i.e. without cdist-config)
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
6f7312e877
commit
b19a29be6e
1 changed files with 6 additions and 6 deletions
|
@ -18,14 +18,14 @@
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Setup environment for use with cdist
|
# Setup environment for use with cdist - must be standalone!
|
||||||
#
|
#
|
||||||
|
|
||||||
. cdist-config
|
__cdist_pwd="$(pwd -P)"
|
||||||
[ $# -eq 0 ] || __cdist_usage "no arguments"
|
__cdist_mydir="${0%/*}";
|
||||||
|
__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)"
|
||||||
# Allow access to unset variables like PATH and MANPATH
|
__cdist_myname=${0##*/};
|
||||||
set +u
|
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
||||||
|
|
||||||
echo export PATH=$__cdist_abs_mydir:$PATH
|
echo export PATH=$__cdist_abs_mydir:$PATH
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue