Skip to content

Instantly share code, notes, and snippets.

@573
Created October 17, 2012 19:02
Show Gist options
  • Save 573/3907433 to your computer and use it in GitHub Desktop.
Save 573/3907433 to your computer and use it in GitHub Desktop.
environment variables for glfw-b (~/.bashrc.d/glfw-b.bashrc)
#!/bin/env bash
case $PATH in *\/h\/glfw\/lib-mingw\/x86*) PATH=${PATH:+/h/glfw/lib-mingw/x86:${PATH//\/h\/glfw\/lib-mingw\/x86/}};; esac
case $PATH in \
*) PATH=${PATH:+${PATH}:/h/glfw/lib-mingw/x86};; \
esac
case $PATH in *::*) PATH=${PATH//::/:};; esac
case $C_INCLUDE_PATH in \
'') C_INCLUDE_PATH=${C_INCLUDE_PATH:-h:/glfw/include};; \
*) C_INCLUDE_PATH=${C_INCLUDE_PATH:+${C_INCLUDE_PATH}\;h:/glfw/include};; \
esac
case $LIBRARY_PATH in \
'') LIBRARY_PATH=${LIBRARY_PATH:-h:/glfw/lib-mingw/x86};; \
*) LIBRARY_PATH=${LIBRARY_PATH:+${LIBRARY_PATH}\;h:/glfw/lib-mingw/x86};; \
esac
case $INCLUDE in \
'') INCLUDE=${INCLUDE:-h:\\\glfw\\\include};; \
*) INCLUDE=${INCLUDE:+${INCLUDE}\;h:\\\glfw\\\include};; \
esac
case $LIB in \
'') LIB=${LIB:-h:\\\glfw\\\lib-mingw\\\x86};; \
*) LIB=${LIB:+${LIB}\;h:\\\glfw\\\lib-mingw\\\x86};; \
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment