summaryrefslogtreecommitdiffstats
path: root/bin/winewrapper
diff options
context:
space:
mode:
Diffstat (limited to 'bin/winewrapper')
-rwxr-xr-xbin/winewrapper24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/winewrapper b/bin/winewrapper
new file mode 100755
index 0000000..94cc38a
--- /dev/null
+++ b/bin/winewrapper
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+if [ "$1" = "" ]; then
+ echo "Must supply parameters"
+ exit 3
+fi
+
+oldIFS="$IFS"
+IFS=:
+for i in $PATH; do
+ if [ -e $i/$1 ]; then
+ executable="$i/$1"
+ break
+ fi
+done
+
+if [ "$executable" = "" ]; then
+ echo "$1 not found in path" 1>&2
+ exit 3
+fi
+
+IFS="$oldIFS"
+shift
+wine "$executable" "$@"