From: Arnaud Giersch Date: Fri, 30 Nov 2012 14:59:14 +0000 (+0100) Subject: Print a message and exit if file was not found. X-Git-Tag: v3_9_rc1~86^2~207 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e2af0d84aea271ea0a95ccdb6eecb95fd8d7870b?hp=bdf65e2dcb24e3aba35b9f861f8e24b50d3c4d19 Print a message and exit if file was not found. --- diff --git a/src/smpi/smpirun.in b/src/smpi/smpirun.in index cb94bd6b31..bdede7a838 100755 --- a/src/smpi/smpirun.in +++ b/src/smpi/smpirun.in @@ -236,9 +236,12 @@ fi if [ "${EXTOPT}" = "smpi_replay" ]; then APP_TRACES=$1; - if [ -n "${APP_TRACES}" ] && [ -f ${APP_TRACES} ]; then + if [ -n "${APP_TRACES}" ] && [ -f "${APP_TRACES}" ]; then hosttraces=(`cat ${APP_TRACES} | tr \\\n " "`) NUMTRACES=`cat ${APP_TRACES} | wc -l` + else + printf "File not found: %s\n", "${APP_TRACES:-\${APP_TRACES}}" >&2 + exit 1 fi fi