Fixed some issues with dali_env script 07/52307/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 20 Nov 2015 14:24:09 +0000 (14:24 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 20 Nov 2015 14:29:30 +0000 (14:29 +0000)
- It can now be run in directories that begin with "dali-env..." (before it just used to get stuck in a loop).
- Display the newly installed dali_env path on output rather than just "dali_env" alone as that may reference an already installed one.

Change-Id: I0364cc2fd4731c1d7727df2ca1c19ee615b1d3e0

build/scripts/dali_env

index f69909f..3230e9e 100755 (executable)
@@ -96,14 +96,14 @@ my $root_path = getcwd();
 if($exec_path =~ m!dali-env/opt/bin!)
 {
     $root_path = $exec_path;
-    while($root_path !~ m!dali-env$!)
+    while($root_path !~ m!dali-env$! && $root_path != "")
     {
         $root_path = dirname($root_path);
     }
 }
 elsif($root_path =~ m!dali-env!)
 {
-    while($root_path !~ m!dali-env$!)
+    while($root_path =~ m!dali-env$! && $root_path != "")
     {
         $root_path = dirname($root_path);
     }
@@ -163,7 +163,7 @@ sub create_setenv
     print <<"EOF";
 # To use the desktop libraries, please add the following lines to your .bashrc or
 # create a setenv script from them, e.g. by running this command as follows
-# \$ dali_env -s > setenv
+# \$ $install_path/bin/dali_env -s > setenv
 #
 # You can then source this script by using
 # \$ . setenv