diff --git a/this_build_bin_path.sh b/this_build_bin_path.sh index 8d0528673..1de99142a 100755 --- a/this_build_bin_path.sh +++ b/this_build_bin_path.sh @@ -1,39 +1,91 @@ # SPDX-License-Identifier: LGPL-3.0-or-other # Copyright (C) 2021 Contributors to the SLS Detector Package -#echo $# -#if [ $# = 0 ]; then -# f=$0 -#else -# f=$1 -#fi -#echo $f -if [ "x${BASH_ARGV[0]}" = "x" ]; then -#if [ "x$f" = "x" ]; then - if [ ! -f this_build_bin_path.sh ]; then - f=$0 - echo "aaaa" - #thispath=$(dirname ${BASH_ARGV[0]}) - thispath=$(dirname $f) - p=$(cd ${thispath};pwd); - THIS_PATH="$p/build/bin/" - # echo "ERROR: must cd where/this/package/is before calling this_path.sh" -# echo "Try sourcing it" - else - echo "bbb" - THIS_PATH="$PWD/build/bin/"; - fi -else - thispath=$(dirname ${BASH_ARGV[0]}) - p=$(cd ${thispath};pwd); - THIS_PATH="$p/build/bin/" - echo "ccc" -fi +# +# Put the binaries of a build tree on PATH/LD_LIBRARY_PATH/PYTHONPATH. +# +# Usage (the exports only survive when the script is sourced): +# source this_build_bin_path.sh # auto-detect build dir +# source this_build_bin_path.sh build_qt6 # explicit build dir +# SLS_BUILD_DIR=/path/to/build_qt6 source this_build_bin_path.sh +# +# Auto-detection looks for