#!/bin/sh # Copyright (C) 2002, Earnie Boyd # mailto:earnie@users.sf.net # This file is part of MSYS # http://www.mingw.org/msys.shtml # File: which opt=$1 case $opt in -*) path=$2;; *) opt=-u; path=$1 ;; esac case $path in --) path=$3;; esac case $opt in -u) path="$(echo "$path"|sed \ -e 's,\\,/,g')" ;; -m) path="$(echo "$path"|sed \ -e 's,^/\([[:alpha:]]\)/,\1:\\,' \ -e 's,\\,/,g')" ;; -w) path="$(echo "$path"|sed \ -e 's,^/\([[:alpha:]]\)/,\1:\\,' \ -e 's,/,\\,g')" ;; *) path="$(echo "$path"|sed \ -e 's,^\([[:alpha:]]\):\\,/\1/,' \ -e 's,^\([[:alpha:]]\):$,/\1/,' \ -e 's,\\,/,g')" ;; esac echo "$path"