build/cygwin-wrapper
author cvs2hg
Sat, 05 Jun 2004 05:46:49 +0000
branchFIREFOX_0_9_3_BRANCH
changeset 3141 3cce093b872de264676e6d843e9a1d8b3755d922
parent 3083 514f3ab27e9be7e9bd950c43ede6e0c4d6108e4d
permissions -rwxr-xr-x
fixup commit for branch 'FIREFOX_0_9_3_BRANCH'

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