Created
August 28, 2010 12:21
-
-
Save rctay/555079 to your computer and use it in GitHub Desktop.
[msys] strip out 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
# | |
# Strip out cygwin paths from your PATH. Assumes that your cygwin directories | |
# have the word cygwin in their names - if not, change the regex pattern | |
# appropriately. | |
# | |
# Useful for users who are using both msys/mingw and cygwin - put this in your | |
# ~/.profile so that msys doesn't use them. | |
# | |
export PATH="$(echo -n $PATH | awk ' | |
BEGIN { RS=":"; output="" } | |
!/cygwin/ { output = (output == "") ? $0 : output":"$0 } | |
END { print output } | |
')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment