3 # Name : target_runner.sh
4 # Author : Chris Koeritz
5 # Rights : Copyright (C) 2012-$now by Feisty Meow Concerns, Ltd.
7 # This script is free software; you can modify/redistribute it under the terms
8 # of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
9 # Feel free to send updates to: [ fred@gruntose.com ]
12 # Runs the programs listed in clam's RUN_TARGETS and reports any errors seen.
14 #echo entering target_runner with variables:
15 #echo -e "\tRUN_TARGETS=${RUN_TARGETS}"
16 #echo -e "\tDIRTY_FILE=${DIRTY_FILE}"
17 #echo -e "\tSUBMAKE_FLAG=${SUBMAKE_FLAG}"
18 #echo -e "\tFAILURE_FILE=${FAILURE_FILE}"
20 if [ ! -z "${RUN_TARGETS}" ]; then
21 if [ -f "${DIRTY_FILE}" -o -f "${SUBMAKE_FLAG}" ]; then
23 for program_name in ${RUN_TARGETS}; do
24 base=$(basename $program_name);
27 if [ $exitval -ne 0 ]; then
28 echo "ERROR: $program_name exits with $exitval at $(date)";
29 total_exitval=$(($total_exitval + 1));
32 if [ $total_exitval -ne 0 ]; then
33 echo "FAILURE: $total_exitval errors occurred in RUN_TARGETS.";
34 echo yep >"${FAILURE_FILE}";