Detect empty LD_LIBRARY_PATH.
--- a/.env Fri Sep 19 20:03:02 2014 +0300
+++ b/.env Fri Sep 26 01:18:54 2014 +0300
@@ -36,19 +36,18 @@
export PATH=/sbin:$PATH
fi
-if [[ ! $LD_LIBRARY_PATH =~ $HOME/usr/lib ]]; then
- export LD_LIBRARY_PATH=$HOME/usr/lib
-else
+[[ -z $LD_LIBRARY_PATH ]] && LD_LIBRARY_PATH=$HOME/usr/lib
+if [[ ! :$LD_LIBRARY_PATH =~ :$HOME/usr/lib ]]; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":$HOME/usr/lib
fi
-if [[ -z "$MANPATH" ]]; then
+if [[ -z $MANPATH ]]; then
export MANPATH=~/usr/share/man:
elif [[ ! $MANPATH =~ $HOME/usr/share/man: ]]; then
export MANPATH=$MANPATH:$HOME/usr/share/man:
fi
-if [[ -z "$INFOPATH" ]]; then
+if [[ -z $INFOPATH ]]; then
export INFOPATH=~/usr/share/info:
elif [[ ! $INFOPATH =~ $HOME/usr/share/info: ]]; then
export INFOPATH=$INFOPATH:$HOME/usr/share/info: