CheckExploitConfPass.sh 930 Bytes
#!/bin/bash
 
#################################################
# File :    CheckExploitConfPass.sh             #
# Brief :   Check Exploit Confidence Pass       #
# Author :  Jean-François Rey                   #
# Version : 1.0                                 #
# Date :    19/07/13                            #
#################################################
 
# configuration file
. "$OTMEDIA_HOME/cfg/ExploitConfidencePass.cfg"

# check_exploitconfpass_lex_check(path+basename of the lexique)
# -$1 : full path/basename of lexique files
# return 0 if ok, otherwise return 1
function  check_exploitconfpass_lex_check()
{
    if [ $# -ne 1 ]
    then 
        if [ -e "$1.bin" ] && [ -s "$1.bin" ] && [ -e "$1.dic" ] && [ -s "$1.dic" ] && [ -e "$1.nde" ] && [ -s "$1.nde" ] && [ -e "$1.tra" ] && [ -s "$1.tra" ]
        then
            return 0
        else
            return 1
        fi
    fi
    
    return 0
}