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