OSDN Git Service

further improve shell profile file
authorIvailo Monev <xakepa10@laimg.moc>
Sat, 2 Sep 2017 09:07:42 +0000 (09:07 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Sat, 2 Sep 2017 09:07:42 +0000 (09:07 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
cmake/profile.sh.cmake

index c7c09e7..2f7e5d2 100644 (file)
@@ -13,8 +13,10 @@ safe_path_append() {
     done
     IFS="$oldIFS"
 
-    if [ "$found" != "yes" ];then
+    if [ "$found" != "yes" ] && [ -n "$2" ];then
         export "$1"="$2:$3"
+    elif [ "$found" != "yes" ];then
+        export "$1"="$3"
     fi
 }