create
/etc/profile.d/custompath.sh with:pathmunge () {
eval dOPATH="\$${1}"
if ! echo ${dOPATH} | /bin/egrep -q "(^|:)$2($|:)" ; then
if [ "$3" = "after" ] ; then
export ${1}=${dOPATH}:$2
else
export ${1}=$2:${dOPATH}
fi
fi
}
if [ "$LOGNAME" != "root" ]
then
pathmunge PATH . # for those who like it
pathmunge PATH /usr/local/texlive/2013/bin/x86_64-linux append
fi
remarks
custompath.shdoes not need to be executable- definice of
pathmungehas to be present, it does not propagate from /etc/profile
Žádné komentáře:
Okomentovat