2002-06-17 21:30:22 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Stupid wrapper to avoid win32 dospath/cygdrive issues
|
|
|
|
#
|
|
|
|
prog=$1
|
|
|
|
shift
|
|
|
|
if test -z "$prog"; then
|
|
|
|
exit 0
|
|
|
|
fi
|
2003-04-03 03:22:41 +04:00
|
|
|
mountpoint=`mount -p | awk '{ if (/^\//) { print $1; exit } }'`
|
2003-04-02 10:22:59 +04:00
|
|
|
if test -z "$mountpoint"; then
|
|
|
|
print "Cannot determine cygwin mount points. Exiting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
mountpoint=`echo $mountpoint | sed 's|/$||'`
|
2002-06-17 21:30:22 +04:00
|
|
|
if test "$prog" = "-up"; then
|
|
|
|
prog=$1
|
|
|
|
shift
|
2003-04-02 10:22:59 +04:00
|
|
|
args=`echo $* | sed -e "s|-I\([a-zA-Z]\):/|-I${mountpoint}/\1/|g;"`
|
2002-06-17 21:30:22 +04:00
|
|
|
else
|
2003-04-02 10:22:59 +04:00
|
|
|
args=`echo $* | sed -e "s|${mountpoint}/\([a-zA-Z]\)/|\1:/|g;"`
|
2002-06-17 21:30:22 +04:00
|
|
|
fi
|
|
|
|
exec $prog $args
|