-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix launch_mantidplot script when not run under bash
dirname is a bash function and is not available in all shells. Refs #10271
- Loading branch information
1 parent
ecd9f8f
commit dd80a6e
Showing
2 changed files
with
29 additions
and
18 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,21 @@ | ||
#!/bin/sh | ||
# | ||
# Launch Mantidplot using any necessary LD_PRELOAD or software collection behaviour | ||
# | ||
# Script is configured by CMake | ||
|
||
# Find out where we are | ||
SCRIPTFILE=$(readlink -f \"$0\") | ||
INSTALLDIR=$(echo $SCRIPTFILE | sed -r -e 's|^(.*)/(.*)$|\1|g') #.* is greedy and eats up until the final slash | ||
|
||
# Define extra libraries and load paths | ||
LOCAL_PRELOAD=@EXTRA_LDPRELOAD_LIBS@:${LD_PRELOAD} | ||
LOCAL_LDPATH=@EXTRA_LDPATH@:${LD_LIBRARY_PATH} | ||
if [ -z \"${TCMALLOC_RELEASE_RATE}\" ]; then | ||
TCM_RELEASE=10000 | ||
else | ||
TCM_RELEASE=${TCMALLOC_RELEASE_RATE} | ||
fi | ||
|
||
# Launch | ||
LD_PRELOAD=${LOCAL_PRELOAD} TCMALLOC_RELEASE_RATE=${TCM_RELEASE} LD_LIBRARY_PATH=${LOCAL_LDPATH} @WRAPPER_COMMAND@ \"$INSTALLDIR/@MANTIDPLOT_EXEC@ $*\" |