Created
August 6, 2015 09:14
-
-
Save kepkin/23c054f2be51f05d565e to your computer and use it in GitHub Desktop.
bash trick to transform cygwin paths
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
ARGS=() | |
if [ "$(uname -o)" == "Cygwin" ]; then | |
for arg in "$@" | |
do | |
if [ "${arg:0:1}" == "/" ]; then | |
arg=$(cygpath -w $arg) | |
fi | |
ARGS+=($arg) | |
done | |
fi | |
echo ${ARGS[@]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment