Kaydet (Commit) e37837c4 authored tarafından Michael Stahl's avatar Michael Stahl

bin/run: add a convenient shell wrapper to run executables from workdir

Change-Id: Ide3361fd5eba6462095cc45c0c99b1ab27a16262
üst f049b83c
#!/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}"/$@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment