Examples: Adapt to system-packaged DDS

Distribution policies forbid installation of environment scripts at the
install prefix. So, e.g. in the Fedora DDS package the DDS_env.sh is
installed to /usr/bin and available via $PATH.
This commit is contained in:
Dennis Klein 2021-05-26 20:59:09 +02:00 committed by Dennis Klein
parent ed78ccd29c
commit 5efa50929d
4 changed files with 25 additions and 4 deletions

View File

@ -18,7 +18,12 @@ cleanup() {
echo "CLEANUP PERFORMED"
}
source @DDS_INSTALL_PREFIX@/DDS_env.sh
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
source @DDS_INSTALL_PREFIX@/DDS_env.sh
elif command -v DDS_env.sh &> /dev/null; then
source DDS_env.sh
fi
export PATH=@BIN_DIR@:$PATH
plugin=${1:-localhost}

View File

@ -15,7 +15,12 @@ cleanup() {
echo "CLEANUP PERFORMED"
}
source @DDS_INSTALL_PREFIX@/DDS_env.sh
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
source @DDS_INSTALL_PREFIX@/DDS_env.sh
elif command -v DDS_env.sh &> /dev/null; then
source DDS_env.sh
fi
export PATH=@BIN_DIR@:$PATH
exec 5>&1

View File

@ -15,7 +15,12 @@ cleanup() {
echo "CLEANUP PERFORMED"
}
source @DDS_INSTALL_PREFIX@/DDS_env.sh
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
source @DDS_INSTALL_PREFIX@/DDS_env.sh
elif command -v DDS_env.sh &> /dev/null; then
source DDS_env.sh
fi
export PATH=@BIN_DIR@:$PATH
exec 5>&1

View File

@ -17,7 +17,13 @@ cleanup() {
echo "CLEANUP PERFORMED"
}
source @DDS_INSTALL_PREFIX@/DDS_env.sh
if [[ -e "@DDS_INSTALL_PREFIX@/DDS_env.sh" ]]; then
source @DDS_INSTALL_PREFIX@/DDS_env.sh
elif command -v DDS_env.sh &> /dev/null; then
source DDS_env.sh
fi
export PATH=@BIN_DIR@:$PATH
exec 5>&1