From 7e99f07935f9f6faf761804e0460c57be3a0ffa5 Mon Sep 17 00:00:00 2001 From: rey jean-Francois Date: Thu, 1 Aug 2013 14:02:08 +0200 Subject: [PATCH] up --- main_tools/ExploitConfidencePass.sh | 16 ++++++++++------ main_tools/OneScriptToRuleThemAll.sh | 2 +- tools/scripts/Tools.sh | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/main_tools/ExploitConfidencePass.sh b/main_tools/ExploitConfidencePass.sh index 7018bec..3314b72 100755 --- a/main_tools/ExploitConfidencePass.sh +++ b/main_tools/ExploitConfidencePass.sh @@ -15,7 +15,6 @@ echo "### ExploitConfidencePass.sh ###" - # Check OTMEDIA_HOME env var if [ -z ${OTMEDIA_HOME} ] then @@ -78,7 +77,7 @@ do RERUN=1 ;; :) - echo "Option -$OPTARG requires an argument." >&2 + echo "Option -$OPTARG requires an argument." > /dev/stderr exit 1 ;; \?) @@ -136,11 +135,12 @@ then { RES_CONF_DIR=$(cat $CONFPASS_CONFIG_FILE | grep "^RES_CONF_DIR=" | cut -f2 -d"=") RES_CONF=$(cat $CONFPASS_CONFIG_FILE | grep "^CONF_DIR=" | cut -f2 -d"=") - print_warn "[${BASENAME}] Use confidence measure from : $RES_CONF" 1 + print_info "[${BASENAME}] Use confidence measure from : $RES_CONF" 2 } else { - print_error "Can't find $CONFPASS_CONFIG_FILE" 1 + print_error "[${BASENAME}] Can't find $CONFPASS_CONFIG_FILE" + print_error "[${BASENAME}] -> use res_p2" RES_CONF_DIR="$INPUT_DIR/conf/res_p2/scored_ctm" RES_CONF="$INPUT_DIR/conf/res_p2" } @@ -155,7 +155,11 @@ mkdir -p $TRIGGER_CONFZONE > /dev/null 2>&1 # Create Workspace # #------------------# # Lock directory -if [ -e "$OUTPUT_DIR_BASENAME/EXPLOITCONFPASS.lock" ] && [ $RERUN -eq 0 ]; then exit 1; fi +if [ -e "$OUTPUT_DIR_BASENAME/EXPLOITCONFPASS.lock" ] && [ $RERUN -eq 0 ] +then + print_warn "[${BASENAME}] ExploitConfidencePass is locked -> exit" 2 + exit 1 +fi rm "$OUTPUT_DIR/EXPLOITCONFPASS.unlock" > /dev/null 2>&1 touch "$OUTPUT_DIR/EXPLOITCONFPASS.lock" > /dev/null 2>&1 @@ -167,7 +171,7 @@ echo "TRIGGER_DIR=$TRIGGER_CONFZONE" >> $OUTPUT_DIR/ExploitConfPass.cfg echo "TRIGGER_SPEERAL=$TRIGGER_CONFZONE/speeral/" >> $OUTPUT_DIR/ExploitConfPass.cfg echo "LEX_SPEERAL=$EXT_LEX/speeral/${lexname}_ext" >> $OUTPUT_DIR/ExploitConfPass.cfg echo "LEX_BINODE_SPEERAL=$EXT_LEX/speeral/${lexname}_ext.bin" >> $OUTPUT_DIR/ExploitConfPass.cfg - +print_info "[${BASENAME}] Save config in $OUTPUT_DIR_BASENAME/ExploitConfPass.cfg" 1 #-----------------------# # Segmentation by show # diff --git a/main_tools/OneScriptToRuleThemAll.sh b/main_tools/OneScriptToRuleThemAll.sh index 438cceb..9aca8ae 100755 --- a/main_tools/OneScriptToRuleThemAll.sh +++ b/main_tools/OneScriptToRuleThemAll.sh @@ -8,7 +8,7 @@ # Author : Jean-François Rey # ##################################### -echo -e "OneScriptToRuleThemAll :" +echo -e "#### OneScriptToRuleThemAll ####" LORD=" Three::rings for:::the::Elven-King under:the:sky,:Seven:for:the diff --git a/tools/scripts/Tools.sh b/tools/scripts/Tools.sh index b419267..4ff04de 100755 --- a/tools/scripts/Tools.sh +++ b/tools/scripts/Tools.sh @@ -82,6 +82,6 @@ print_log_file() { if [ $# -eq 2 ] then - echo -e "$message" >> $filename + echo -e "$2" >> $1 fi } -- 1.8.2.3