[Scilab-users] Error while calling 'builder gateway function' using bash script

Lavitha Pereira lavitha89 at gmail.com
Thu Aug 27 07:53:22 CEST 2015


Dear All,

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:

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

where as the below 3 lines are not generated as it does on Scilab console.

ilib_gen_Make: Modification of the Makefile in TMPDIR
Running the makefile
Generate a cleaner file

​Below is my code:
#!/bin/bash
SCI_PATH="/home/lavitha/Downloads/scilab-5.5.2/bin/scilab" #Scilab software
location path

#1st step of testing. getting loader file generated(a.log if error, b.log
if no error))
process_builder()
{
OUTPUT=` timeout 1 $SCI_PATH -nb -nwni -f builder.sce`
echo $OUTPUT
        if [[ "${OUTPUT}" =~ "!--error" ]];
            then
        echo "ERROR: ${sce_file}" >> ./error_builder.log
        echo "${OUTPUT}" >> ./error_builder.log
        else
        echo "################# ${sce_file} #####################" >>
./output_builder.log
        echo "${OUTPUT}" >> ./output_builder.log
        fi
        unset OUTPUT
}

#2nd step, getting loader.sce run
process_loader()
{

OUTPUT=` timeout 1 $SCI_PATH -nb -nwni -f loader.sce`
echo $OUTPUT
        if [[ "${OUTPUT}" =~ "!--error" ]];
            then
        echo "ERROR: ${sce_file}" >> ./error_loader.log
        echo "${OUTPUT}" >> ./error_loader.log
        else
        echo "################# ${sce_file} #####################" >>
./output_loader.log
        echo "${OUTPUT}" >> ./output_loader.log
        fi
        unset OUTPUT


}
process_main()
{
OUTPUT=` timeout 1 $SCI_PATH -nb -nwni -f lena.sce`
echo $OUTPUT
echo "${OUTPUT}" >> ./output_lena.log
}

process_builder
#sleep 30
process_loader
#sleep 30
process_main


​

-- 
Thanks & Regards,
Lavitha M. Pereira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20150827/030bc011/attachment.htm>


More information about the users mailing list