Combined dependent check into "elif".
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 01 Jun 2021 17:48:41 +0300
changeset 980 9f36844d6441
parent 979 2485d7292a73
child 981 79ac660917cb
Combined dependent check into "elif".
.env.bash
--- a/.env.bash	Tue Jun 01 17:47:00 2021 +0300
+++ b/.env.bash	Tue Jun 01 17:48:41 2021 +0300
@@ -40,8 +40,9 @@
 fi
 
 
-[[ -z $LD_LIBRARY_PATH ]] && LD_LIBRARY_PATH=$HOME/usr/lib
-if [[ ! :$LD_LIBRARY_PATH: =~ :$HOME/usr/lib: ]]; then
+if [[ -z $LD_LIBRARY_PATH ]]; then
+  LD_LIBRARY_PATH=$HOME/usr/lib
+elif [[ :$LD_LIBRARY_PATH: != *:$HOME/usr/lib:* ]]; then
   export LD_LIBRARY_PATH="$LD_LIBRARY_PATH":$HOME/usr/lib
 fi