build/cygwin-wrapper
author christophe.ravel.bugs%sun.com
Wed, 12 May 2004 20:14:14 +0000
branchNSPR_4_4_BRANCH
changeset 3118 e325b2f7a2491d3a2638820d0cdd6b543932a76a
parent 2821 d928f74ae1cc495d01b7ac018680665b07056e80
child 2832 833293c306d89bcc165eb6d7ba423bd58415b5a4
child 3166 3bb6bfcef8c6367ad94f56bbdc5cecc3e2739b9e
permissions -rwxr-xr-x
238319: Sun packaging changes

#!/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