diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-12-04 16:08:42 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-12-05 12:01:59 +0100 |
commit | 564f74ce4f70211290c93881f3c0e4e5f1587b2e (patch) | |
tree | 34b91107f13afc19137247fd9657f0a4432a9ecb /bin | |
parent | 375e8582dbd1fb82bdd90959fbdc325304e08802 (diff) |
bin/run: add WNT support
Change-Id: I9dd1ae23d27c5733770314ca907b5d36b749fd74
(cherry picked from commit 79233d98d98df1a56e623f35806183071499b194)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/run | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -9,7 +9,29 @@ # simple wrapper script to run non-installed executables from workdir -if [ $(uname) = Darwin ]; then +if uname | grep -i CYGWIN >/dev/null; then + +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:///$(cygpath -m "${dir}")/instdir/program/fundamental.ini +export PATH=${PATH:+$PATH:}"${dir}"/instdir/program + +echo "setting URE_BOOTSTRAP to: ${URE_BOOTSTRAP}" +echo "setting search path to: ${PATH}" +echo "execing: ${exedir}/$1" + +exec "${exedir}"/$@ + +elif [ $(uname) = Darwin ]; then dir=$(pwd) |