DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
#!/bin/sh
#
# Stupid wrapper to avoid win32 dospath/cygdrive issues
#
prog=$1
shift
if test -z "$prog"; then
    exit 0
fi

mountpoint=$CYGDRIVE_MOUNT
if test -z "$mountpoint"; then
    mountpoint=`mount -p`
    if test -z "$mountpoint"; then
       print "Cannot determine cygwin mount points. Exiting"
       exit 1
    fi
fi

mountpoint=${mountpoint#*/}
mountpoint=/${mountpoint%%[!A-Za-z0-9_]*}
mountpoint=${mountpoint%/}

args=""
up=""
if test "${prog}" = "-up"; then
    up=1
    prog=${1}
    shift
fi

process=1

for i in "${@}"
do
    if test "${i}" = "-wrap"; then
        process=1
    else
        if test "${i}" = "-nowrap"; then
            process=
        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%%:*}
                        i=-I${mountpoint}/${driveletter}/${pathname}
                    fi
                else
                    eval 'leader=${i%%'${mountpoint}'/[a-zA-Z]/*}'
                    if ! test "${leader}" = "${i}"; then
                        eval 'pathname=${i#'${leader}${mountpoint}'/[a-zA-Z]/}'
                        eval 'no_mountpoint=${i#'${leader}${mountpoint}'/}'
                        driveletter=${no_mountpoint%%/*}
                        i=${leader}${driveletter}:/${pathname}
                    fi
                fi
            fi

            args="${args} ${i}"
        fi
    fi
done

exec $prog $args