Last active
May 25, 2017 01:39
-
-
Save jniemann66/2ecdc9e9799269c19b6b74acc50d83d4 to your computer and use it in GitHub Desktop.
Script to resolve the include search paths from minGW to something sensible
This file contains hidden or 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
#!/usr/bin/env bash | |
# usage: resolve-path.sh "<some-stupid-path>" | |
# changes this: "e:\mingw\bin\../lib/gcc/mingw32/5.3.0/../../../../include" | |
# ... into this: /e/mingw/include | |
# first sed script replaces <letter><colon> with <forward-slash><letter> | |
# second sed script replaces back-slashes with forward-slashes | |
realpath $1 | sed -e 's/\([a-zA-Z]\):/\/\1/g' -e 's/\\/\//g' | |
# see http://www.mingw.org/wiki/IncludePathHOWTO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment