Skip to content

Instantly share code, notes, and snippets.

@kepkin
Created August 6, 2015 09:14
Show Gist options
  • Save kepkin/23c054f2be51f05d565e to your computer and use it in GitHub Desktop.
Save kepkin/23c054f2be51f05d565e to your computer and use it in GitHub Desktop.
bash trick to transform cygwin paths
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