diff --git a/src/scripts/defs.sh b/src/scripts/defs.sh index 82b096d2..f58d62e6 100644 --- a/src/scripts/defs.sh +++ b/src/scripts/defs.sh @@ -49,7 +49,12 @@ check_invoke() { fi } -picard_jar=$(find "$thisdir" -name picard\*.jar) +# Note: `"$thisdir"` might be a symbolic link to a directory. Appending a final +# `/` ensures the link to be resolved in such a case and is a no-op otherwise. +# Without this (or instructng `find` to follow symbolic links by passing the +# `-L` flag), `find` would fail to detect the Picard `*.jar` file if this +# script is called via a directory symlink. +picard_jar=$(find "$thisdir"/ -name picard\*.jar) num_picard_jars=$(wc -w << EOF $picard_jar