16 lines
315 B
Bash
16 lines
315 B
Bash
# vim: filetype=sh
|
|
# .bashrc.d/pathmunge
|
|
|
|
# Create pathmunge to avoid path duplications
|
|
pathmunge () {
|
|
case ":${PATH}:" in
|
|
*:"$1":*)
|
|
;;
|
|
*)
|
|
if [ "$2" = "after" ] ; then
|
|
PATH=$PATH:$1
|
|
else
|
|
PATH=$1:$PATH
|
|
fi
|
|
esac
|
|
}
|