diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/run | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/run b/bin/run new file mode 100755 index 000000000000..365e287ab9d3 --- /dev/null +++ b/bin/run @@ -0,0 +1,24 @@ +#!/bin/sh + +# simple wrapper script to run non-installed executables from workdir + +dir=$(realpath "$(pwd)") + +while test ! -d "${dir}/instdir/program" ; do + if test "${dir}" = "/"; then + echo "error: cannot find \"program\" dir from \"$(pwd)\"" + exit 1 + fi + dir=$(realpath "${dir}/..") +done + +exedir="${dir}"/workdir/LinkTarget/Executable +export URE_BOOTSTRAP=file://"${dir}"/instdir/program/fundamentalrc +export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"${dir}"/instdir/ure/lib:"${dir}"/instdir/program + +echo "setting URE_BOOTSTRAP to: ${URE_BOOTSTRAP}" +echo "setting search path to: ${LD_LIBRARY_PATH}" +echo "execing: ${exedir}/$1" + +cd "${dir}"/instdir/program +exec "${exedir}"/$@ |