#!/bin/bash # # we [command] [args...] # # - execute win32 command with posix pathname # for i in "$@" do case "$i" in \ /* ) PARAM=`cygpath -m "$i"` ;; -?/* ) PARAM=${i:0:2}`cygpath -m "${i:2}"` ;; -*=/* ) PARAM=${i%%/*}`cygpath -m "${i#-*=}"` ;; *) PARAM="$i" ;; esac CMD="${CMD} ${PARAM// /\ }" done bash -c "${CMD}"