summaryrefslogtreecommitdiffstats
path: root/bin/winewrapper
blob: 94cc38adc49e3f18b71293332ca3cfce1f5caa4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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" "$@"