summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-04 16:08:42 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-04 16:09:07 +0100
commit79233d98d98df1a56e623f35806183071499b194 (patch)
tree9d5726594e698d0d1fb843536d73f3f652f07821 /bin
parent71c58fce69cc1a463d9b9a5711718211adf414fe (diff)
bin/run: add WNT support
Change-Id: I9dd1ae23d27c5733770314ca907b5d36b749fd74
Diffstat (limited to 'bin')
-rwxr-xr-xbin/run24
1 files changed, 23 insertions, 1 deletions
diff --git a/bin/run b/bin/run
index a3acad6b4ae7..341e7d593190 100755
--- a/bin/run
+++ b/bin/run
@@ -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)