Skip to content

Commit 0abce5a

Browse files
committed
Make cafrun.in more robust & runable on windows
No special changes needed beyond robustness improvements
1 parent 9cac967 commit 0abce5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/extensions/cafrun.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@ set -o pipefail
5656

5757
caf_version='@CAF_VERSION@'
5858
CAFRUN="@MPIEXEC@"
59-
if [[ "${CAFRUN}" == @*@ ]]; then
59+
if [[ "${CAFRUN}" == @*@ || -z "${CAFRUN}" ]]; then
6060
CAFRUN=mpiexec
6161
fi
6262
have_failed_img=@HAVE_FAILED_IMG@
63-
if [[ ${have_failed_img} == @*@ ]]; then
63+
if [[ ${have_failed_img} == @*@ || -z "${have_failed_img}" ]]; then
6464
have_failed_img=false
6565
fi
6666
numproc_flag='@MPIEXEC_NUMPROC_FLAG@'
67-
if [[ ${numproc_flag} == @*@ ]]; then
67+
if [[ ${numproc_flag} == @*@ || -z "${numproc_flag}" ]]; then
6868
numproc_flag='-np'
6969
fi
7070
preflags="@MPIEXEC_PREFLAGS@"
7171
preflags="${preflags//;/ }"
72-
if [[ "${preflags}" == @*@ ]]; then
72+
if [[ "${preflags}" == @*@ || -z "${preflags}" ]]; then
7373
unset preflags
7474
fi
7575
postflags="@MPIEXEC_POSTFLAGS@"
7676
postflags="${postflags//;/ }"
77-
if [[ "${postflags}" == @*@ ]]; then
77+
if [[ "${postflags}" == @*@ || -z "${postflags}" ]]; then
7878
unset postflags
7979
fi
8080
#-------------------------

0 commit comments

Comments
 (0)