|
|
@ -21,23 +21,13 @@ |
|
|
|
# Setup environment for use with cdist - must be standalone! |
|
|
|
# Setup environment for use with cdist - must be standalone! |
|
|
|
# |
|
|
|
# |
|
|
|
|
|
|
|
|
|
|
|
__cdist_pwd="$(pwd -P)" |
|
|
|
export PATH="$(cd "${0%/*}" && pwd -P):$PATH" |
|
|
|
__cdist_mydir="${0%/*}"; |
|
|
|
export MANPATH="$(cd "${0%/*}/../doc/man" && pwd -P):$MANPATH" |
|
|
|
__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" |
|
|
|
|
|
|
|
__cdist_myname=${0##*/}; |
|
|
|
|
|
|
|
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shell_binary=${SHELL##*/} |
|
|
|
if [ "$(echo ${SHELL##*/} | grep 'csh$')" ]; then |
|
|
|
|
|
|
|
echo setenv PATH $PATH \; |
|
|
|
NEWPATH="$__cdist_abs_mydir:$PATH" |
|
|
|
echo setenv MANPATH $MANPATH |
|
|
|
cd "$__cdist_abs_mydir/../doc/man" |
|
|
|
|
|
|
|
NEWMANPATH="$(pwd -P):$MANPATH" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Match csh, tcsh to handle differently |
|
|
|
|
|
|
|
if [ "$(echo $shell_binary | grep 'csh$')" ]; then |
|
|
|
|
|
|
|
echo setenv PATH $NEWPATH \; |
|
|
|
|
|
|
|
echo setenv MANPATH $NEWMANPATH |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
echo export PATH=$NEWPATH |
|
|
|
echo export PATH=$PATH |
|
|
|
echo export MANPATH=$NEWMANPATH |
|
|
|
echo export MANPATH=$MANPATH |
|
|
|
fi |
|
|
|
fi |
|
|
|