-
-
Save tivnet/8256140 to your computer and use it in GitHub Desktop.
To let PHP recognize Cygwin paths, put this file to /usr/local/bin/php and chmod +x Originally published by http://stackoverflow.com/users/264395/aefxx here: http://stackoverflow.com/questions/12276946/composer-cygwin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Path to the PHP executable | |
php="/cygdrive/c/PHP/php.exe" | |
for ((n=1; n <= $#; n++)); do | |
if [ -e "${!n}" ]; then | |
# Converts Unix style paths to Windows equivalents | |
path="$(cygpath --mixed ${!n} | xargs)" | |
case 1 in | |
$(( n == 1 )) ) | |
set -- "$path" "${@:$(($n+1))}";; | |
$(( n < $# )) ) | |
set -- "${@:1:$((n-1))}" "$path" ${@:$((n+1)):$#};; | |
*) | |
set -- "${@:1:$(($#-1))}" "$path";; | |
esac | |
fi | |
done | |
"$php" "$@" |
Nice I needed this since my word requires me to use windows for some reason but this is for personal purpose
Thank you very much
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome!