File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,14 @@ dirname_shim() {
6868  echo  " ${path:-/ } " 
6969}
7070
71- script_dir=$( dirname_shim " ${BASH_SOURCE[0]} " ) 
71+ if  [[ " ${BASH_SOURCE[0]} " ==  " /" *  ]];  then 
72+   bash_source_abs=" $( realpath " ${BASH_SOURCE[0]} " ) " 
73+   pwd_abs=" $( realpath " ." ) " 
74+   bash_source_rel=${bash_source_abs# " ${pwd_abs} /"  
75+ else 
76+   bash_source_rel=" ${BASH_SOURCE[0]} " 
77+ fi 
78+ script_dir=$( dirname_shim " ${bash_source_rel} " ) 
7279toolchain_path_prefix=" %{toolchain_path_prefix}" 
7380
7481#  Sometimes this path may be an absolute path in which case we dont do anything because
Original file line number Diff line number Diff line change @@ -103,7 +103,14 @@ dirname_shim() {
103103  echo  " ${path:-/ } " 
104104}
105105
106- script_dir=$( dirname_shim " ${BASH_SOURCE[0]} " ) 
106+ if  [[ " ${BASH_SOURCE[0]} " ==  " /" *  ]];  then 
107+   bash_source_abs=" $( realpath " ${BASH_SOURCE[0]} " ) " 
108+   pwd_abs=" $( realpath " ." ) " 
109+   bash_source_rel=${bash_source_abs# " ${pwd_abs} /"  
110+ else 
111+   bash_source_rel=" ${BASH_SOURCE[0]} " 
112+ fi 
113+ script_dir=$( dirname_shim " ${bash_source_rel} " ) 
107114toolchain_path_prefix=" %{toolchain_path_prefix}" 
108115#  Sometimes this path may be an absolute path in which case we dont do anything because
109116#  This is using the host toolchain to build.
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments