- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
#!/bin/sh
# ...
# translate args from unix path to windows, if possible (eterbug #4933)
args_to_winpath()
{
for i in "$@" ; do
local TP="$i"
local TR=${i/\~/$HOME}
if [ -r "$TR" ] ; then
WP=$(winepath -w "$TR" 2>/dev/null)
[ -z "$WP" ] || TP="$WP"
fi
echo "$TP"
done
}
# ...
run_wine $(args_to_winpath "$@")