forked from sultamehr/MAT_IncPions
-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.sh.in
19 lines (16 loc) · 974 Bytes
/
setup.sh.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#Make this package relocatable by making PREFIX overrideable. Default to the old behavior of setting up from a fixed location.
#You might use this feature to run on the FermiGrid for example.
PREFIX=${MINERVA_PREFIX:-"@CMAKE_INSTALL_PREFIX@"}
#Make sure libraries can be found at runtime and executable names can
#be autocompleted by bash.
export LD_LIBRARY_PATH=${PREFIX}/lib:$LD_LIBRARY_PATH
export PATH=${PREFIX}/bin:$PATH
export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:${LD_LIBRARY_PATH}
#Bash autocompletion support for playlist files. Auto-complete will kick in for
#any executable this package produces and suggest playlist names from the install
#directory as well as the current directory.
if command -v complete &> /dev/null #Don't set up autocompletion on zsh which is the new default shell on macos
then
complete -o filenames -W '$(find ${PREFIX}/etc/playlists -type f)' -o default -o bashdefault $(find ${PREFIX}/bin -type f -printf %f\\n)
fi