Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # function to avoid adding duplicate entries to the PATH
- pathmunge () {
- case ":${PATH}:" in
- *:"$1":*)
- ;;
- *)
- if [ "$2" = "after" ] ; then
- PATH=$PATH:$1
- else
- PATH=$1:$PATH
- fi
- esac
- }
- # function to avoid adding duplicate entries to the LD_LIBRARY_PATH
- ldpathmunge () {
- case ":${LD_LIBRARY_PATH}:" in
- *:"$1":*)
- ;;
- *)
- if [ "$2" = "after" ] ; then
- LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$1
- else
- LD_LIBRARY_PATH=$1:$LD_LIBRARY_PATH
- fi
- esac
- }
- # function to avoid adding duplicate entries to the MANPATH
- manpathmunge () {
- case ":${MANPATH}:" in
- *:"$1":*)
- ;;
- *)
- if [ "$2" = "after" ] ; then
- MANPATH=$MANPATH:$1
- else
- MANPATH=$1:$MANPATH
- fi
- esac
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement