From 6db49dab669240bb1584c51a8979070935faee2b Mon Sep 17 00:00:00 2001 From: rey jean-Francois Date: Fri, 2 Aug 2013 09:53:14 +0200 Subject: [PATCH] bugfix arguments --- main_tools/ConfPass.sh | 2 +- main_tools/OneScriptToRuleThemAll.sh | 18 +++++++++--------- tools/scripts/CheckSecondPass.sh | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/main_tools/ConfPass.sh b/main_tools/ConfPass.sh index 3d79e20..7a7d993 100755 --- a/main_tools/ConfPass.sh +++ b/main_tools/ConfPass.sh @@ -73,7 +73,7 @@ do exit 1 ;; \?) - echo "BAD USAGE : unknow opton -$OPTARG" + echo "BAD USAGE : unknow option -$OPTARG" #exit 1 ;; esac diff --git a/main_tools/OneScriptToRuleThemAll.sh b/main_tools/OneScriptToRuleThemAll.sh index d44dfd1..03eecfb 100755 --- a/main_tools/OneScriptToRuleThemAll.sh +++ b/main_tools/OneScriptToRuleThemAll.sh @@ -65,7 +65,7 @@ scoring=0 #---------------# # Parse Options # #---------------# -while getopts ":hDv:cf:r123CeRsa" opt +while getopts ":hDv:cf:r123C:eRsa" opt do case $opt in h) @@ -81,7 +81,7 @@ do echo -e "\t\t-1 :\tDo 1rt pass" echo -e "\t\t-2 :\tDo 2nd pass" echo -e "\t\t-3 :\tDo 3rd pass" - echo -e "\t\t-C :\tDo confidence pass" + echo -e "\t\t-C p :\tDo p confidence pass (1=all, 2 or 3)" echo -e "\t\t-e :\tDo exploit confidence pass (SOLR)" echo -e "\t\t-R :\tDo recompose res" echo -e "\t\t-s :\tDo scoring" @@ -97,7 +97,7 @@ do RING=$RING" -c" ;; f) - RING=$RING" -f $OPTARG" + FORKS=" -f $OPTARG" ;; r) RING=$RING" -r" @@ -121,7 +121,7 @@ do p3=1 ;; C) - conf=1 + conf=$OPTARG ;; e) exploitconf=1 @@ -157,12 +157,12 @@ if [ -e $1 ] && [ -s $1 ] then echo -e "$LORD\n" REP_OUT=$2/$(basename ${1%.*}) - if [ $p1 -eq 1 ];then ${MAIN_SCRIPT_PATH}/FirstPass.sh ${RING} $1 $2;fi - if [ $p2 -eq 1 ];then ${MAIN_SCRIPT_PATH}/SecondPass.sh ${RING} ${REP_OUT};fi - if [ $conf -eq 1 ];then $p${MAIN_SCRIPT_PATH}/ConfPass.sh ${RING} ${REP_OUT} "res_p2";fi + if [ $p1 -eq 1 ];then ${MAIN_SCRIPT_PATH}/FirstPass.sh ${RING} ${FORKS} $1 $2;fi + if [ $p2 -eq 1 ];then ${MAIN_SCRIPT_PATH}/SecondPass.sh ${RING} ${FORKS} ${REP_OUT};fi + if [ $conf -eq 1 ] || [ $conf -eq 2 ];then $p${MAIN_SCRIPT_PATH}/ConfPass.sh ${RING} ${REP_OUT} "res_p2";fi if [ $exploitconf -eq 1 ]; then ${MAIN_SCRIPT_PATH}/ExploitConfidencePass.sh ${RING} ${REP_OUT};fi - if [ $p3 -eq 1 ];then ${MAIN_SCRIPT_PATH}/ThirdPass.sh ${RING} ${REP_OUT};fi - if [ $conf -eq 1 ];then ${MAIN_SCRIPT_PATH}/ConfPass.sh ${RING} ${REP_OUT} "res_p3";fi + if [ $p3 -eq 1 ];then ${MAIN_SCRIPT_PATH}/ThirdPass.sh ${RING} ${FORKS} ${REP_OUT};fi + if [ $conf -eq 1 ] || [ $conf -eq 3 ];then ${MAIN_SCRIPT_PATH}/ConfPass.sh ${RING} ${REP_OUT} "res_p3";fi if [ $recompose -eq 1 ];then ${MAIN_SCRIPT_PATH}/RecomposePass.sh ${RING} ${REP_OUT};fi if [ $scoring -eq 1 ];then ${MAIN_SCRIPT_PATH}/ScoringRes.sh ${RING} ${REP_OUT};fi echo "done" diff --git a/tools/scripts/CheckSecondPass.sh b/tools/scripts/CheckSecondPass.sh index 2017a58..cd0e167 100644 --- a/tools/scripts/CheckSecondPass.sh +++ b/tools/scripts/CheckSecondPass.sh @@ -20,9 +20,9 @@ function check_second_pass_output_speeral() if [ $# -eq 2 ] then if [ ! -e "$1" ] || [ -z "$1" ]; then return 1; fi - FILENBSEG=$(ls "$2/*.seg" | grep -f "$1" | wc -l) - FILENBRES=$(ls "$2/*.res" | grep -f "$1" | wc -l) - FILENBTREIL=$(ls "$2/*.treil" | grep -f "$1" | wc -l) + FILENBSEG=$(ls "$2/*.seg" 2> /dev/null | grep -f "$1" | wc -l) + FILENBRES=$(ls "$2/*.res" 2> /dev/null | grep -f "$1" | wc -l) + FILENBTREIL=$(ls "$2/*.treil" 2 /dev/null | grep -f "$1" | wc -l) FILENB=$(cat "$1" | wc -l) if [ $FILENB -ne $FILENBSEG ] || [ $FILENB -ne $FILENBRES ] || [ $FILENB -ne $FILENBTREIL ] ; then return 1;fi fi -- 1.8.2.3