Skip to content

Commit

Permalink
cudaPackages.autoAddOpenGLRunpathHook: patch all outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneSerge committed Jun 21, 2022
1 parent b08df4e commit c0fc4b2
Showing 1 changed file with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
#!/usr/bin/env bash

# Run autoOpenGLRunpath on all files
echo "Sourcing auto-add-opengl-runpath-hook"

autoAddOpenGLRunpathPhase () {
# TODO: support multiple outputs
for file in $(find ${out,lib,bin} -type f); do
autoAddOpenGLRunpathPhase() {
# shellcheck disable=SC2154 # ignore undeclared "outputs"
# shellcheck disable=SC2068 # ignore "double quote array expansions" for ${outputs[@]}
# FIXME: SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop
for file in $(
find $(
for output in ${outputs[@]} ; do
[ -e ${!output} ] || continue
echo ${!output}
done
) -type f
); do
addOpenGLRunpath $file
done
}
Expand Down

0 comments on commit c0fc4b2

Please sign in to comment.