<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Dear All,<br><br>
        




            
            


    

<p>I am trying to call OpenCV codes from scilab and for this I need a 
builder gateway function. While calling the function on the scilab 
console, I do not face any problems, loader gets generated and and I am 
able to call the functions. 
Now I am trying to call the builder file using bash script. It executes 
and runs till make file as shown below:</p>

<p>Generate a gateway file<br>
   Generate a loader file<br>
   Generate a Makefile<br>
   ilib_gen_Make: Copy compilation files (Makefile*, libtool...) to TMPDIR<br>
   ilib_gen_Make: Copy libskeleton_cpp9990.c to TMPDIR<br>
   ilib_gen_Make: Copy opencv_imread.cpp to TMPDIR<br>
   ilib_gen_Make: configure : Generate Makefile.  </p>

<p>where as the below 3 lines are not generated as it does on Scilab console.</p>

<p>ilib_gen_Make: Modification of the Makefile in TMPDIR<br>
   Running the makefile<br>
   Generate a cleaner file  </p><br clear="all"></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Below is my code:<br>#!/bin/bash<br>SCI_PATH="/home/lavitha/Downloads/scilab-5.5.2/bin/scilab" #Scilab software location path<br><br>#1st step of testing. getting loader file generated(a.log if error, b.log if no error))<br>process_builder()<br>{<br>OUTPUT=` timeout 1 $SCI_PATH -nb -nwni -f builder.sce`<br>echo $OUTPUT<br>    Â Â Â  if [[ "${OUTPUT}" =~ "!--error" ]];<br>            then<br>    Â Â Â  echo "ERROR: ${sce_file}" >> ./error_builder.log<br>    Â Â Â  echo "${OUTPUT}" >> ./error_builder.log<br>    Â Â Â  else<br>    Â Â Â  echo "################# ${sce_file} #####################" >> ./output_builder.log<br>    Â Â Â  echo "${OUTPUT}" >> ./output_builder.log<br>    Â Â Â  fi<br>    Â Â Â  unset OUTPUT<br>}<br><br>#2nd step, getting loader.sce run<br>process_loader()<br>{<br><br>OUTPUT=` timeout 1 $SCI_PATH -nb -nwni -f loader.sce`<br>echo $OUTPUT<br>    Â Â Â  if [[ "${OUTPUT}" =~ "!--error" ]];<br>            then<br>    Â Â Â  echo "ERROR: ${sce_file}" >> ./error_loader.log<br>    Â Â Â  echo "${OUTPUT}" >> ./error_loader.log<br>    Â Â Â  else<br>    Â Â Â  echo "################# ${sce_file} #####################" >> ./output_loader.log<br>    Â Â Â  echo "${OUTPUT}" >> ./output_loader.log<br>    Â Â Â  fi<br>    Â Â Â  unset OUTPUT<br><br><br>}<br>process_main()<br>{<br>OUTPUT=` timeout 1 $SCI_PATH -nb -nwni -f lena.sce`<br>echo $OUTPUT<br>echo "${OUTPUT}" >> ./output_lena.log<br>}<br><br>process_builder<br>#sleep 30<br>process_loader<br>#sleep 30<br>process_main<br><br><br>​</div><br>-- <br><div class="gmail_signature"><div dir="ltr">Thanks & Regards,<div>Lavitha M. Pereira</div></div></div>
</div>