Skip to content

Commit

Permalink
Add in-env.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsmeding committed Aug 30, 2023
1 parent 3ffa85c commit 42f7554
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions in-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
env_cmd=$(sed -n '/^## Compiling using Cabal/,/^```$/!d ; /^ENV=/p' README.md)
if [[ "$(echo "$env_cmd" | wc -l)" -ne 1 ]]; then
echo >&2 "ENV= line in README.md not found!"
exit 1
fi

eval "$env_cmd"
env LD_LIBRARY_PATH="$ENV" "$@"

0 comments on commit 42f7554

Please sign in to comment.