Skip to content

Commit 619d8a8

Browse files
committed
fix for issue #672: Defect: caf script fails to fall back to dynamic libcaf
if the static lib is missing This fixes the substring removal pattern, we want the sortest matching suffix to make sure only the file suffix is replaced, e.g. libcaf_mpi.a by libcaf_mpi.so. This failed in paths containing more than one '.'
1 parent 5f6cb6c commit 619d8a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/extensions/caf.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ substitute_lib () {
180180
case "${1##*.}" in
181181
a|lib)
182182
for suff in so dylib dll ; do
183-
if [[ -f "${1%%.*}.${suff}" ]] ; then
184-
echo "${1%%.*}.${suff}"
183+
if [[ -f "${1%.*}.${suff}" ]] ; then
184+
echo "${1%.*}.${suff}"
185185
return
186186
fi
187187
done
@@ -191,8 +191,8 @@ substitute_lib () {
191191
;;
192192
so|dylib|dll)
193193
for suff in a lib ; do
194-
if [[ -f "${1%%.*}.${suff}" ]] ; then
195-
echo "${1%%.*}.${suff}"
194+
if [[ -f "${1%.*}.${suff}" ]] ; then
195+
echo "${1%.*}.${suff}"
196196
return
197197
fi
198198
done

0 commit comments

Comments
 (0)