Skip to content

Commit

Permalink
Support running from symlink
Browse files Browse the repository at this point in the history
fixes #403
  • Loading branch information
mschilli87 authored and alecw committed Mar 21, 2024
1 parent 6ba1fbb commit 9a6a18e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/scripts/defs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a6a18e

Please sign in to comment.