cygwin-wrapper revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
#
# Try not to spawn programs from within this file. If the stuff in here looks royally
# confusing, see bug: http://bugzilla.mozilla.org/show_bug.cgi?id=206643
# and look at the older versions of this file that are easier to read, but
# do basically the same thing
#
prog=$1
shift
if test -z "$prog"; then
exit 0
fi
# If $CYGDRIVE_MOUNT was not set in configure, give $mountpoint the results of mount -p
if test -z "$mountpoint"; then
mountpoint=`mount -p`
if test -z "$mountpoint"; then
print "Cannot determine cygwin mount points. Exiting"
exit 1
fi
fi
# Delete everything but "/cygdrive" (or other mountpoint) from mount=`mount -p`
mountpoint=${mountpoint%/}
args=""
up=""
if test "${prog}" = "-up"; then
up=1
prog=${1}
shift
fi
process=1
# Convert the mountpoint in parameters to Win32 filenames
for i in "${@}"
do
if test "${i}" = "-wrap"; then
process=1
else
if test "${i}" = "-nowrap"; then
else
if test -n "${process}"; then
if test -n "${up}"; then
pathname=${i#-I[a-zA-Z]:/}
if ! test "${pathname}" = "${i}"; then
no_i=${i#-I}
driveletter=${no_i%%:*}
fi
else
if ! test "${leader}" = "${i}"; then
driveletter=${no_mountpoint%%/*}
fi
fi
fi
args="${args} ${i}"
fi
fi
done