Created
February 15, 2015 23:58
-
-
Save philip-wernersbach/976f5761124fc79c3944 to your computer and use it in GitHub Desktop.
Generate OS X Framework files for Nim
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/sh | |
for framework in $( cat - ); do | |
framework_upper=$( echo $framework | tr '[:lower:]' '[:upper:]' ) | |
framework_lower=$( echo $framework | tr '[:upper:]' '[:lower:]' ) | |
cat > ${framework_lower}_framework.nim <<EOF | |
{.passL: "-framework $framework".} | |
const ${framework_upper}_FRAMEWORK_HEADER* = "<$framework/$framework.h>" | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment