-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Wojtek Porczyk <[email protected]>
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
set -xe | ||
|
||
case "@PATH@" in | ||
@*) | ||
echo This script is intended for running from builddir after being templated by Meson. >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
pathmunge() { | ||
eval "var=\$$1" | ||
case "$var" in *"$2"*) return;; esac | ||
eval "$1=\$2\${$1:+:\$$1}" | ||
eval "export $1" | ||
} | ||
|
||
pathmunge PATH "@PATH@" | ||
pathmunge LD_LIBRARY_PATH "@LD_LIBRARY_PATH@" | ||
pathmunge PKG_CONFIG_PATH "@PKG_CONFIG_PATH@" | ||
pathmunge PYTHONPATH "@PYTHONPATH@" | ||
|
||
exec $SHELL |