ConTeXt offers <code>\beginNEWTEX ... \endNEWTEX</code> to test if one is using LuaTeX or XeTeX.
== Environmental variables ==
''(move to some more appropriate place)''
=== TEXMFCACHE ===
=== OSFONTDIR ===
export OSFONTDIR=/Library/Fonts
=== reloading font database when fonts are not found ===
If you want your font database to be reloaded whenever a non-existing font is asked for in LuaTeX, you need to set one of the variables:
MTX.FONTS.AUTOLOAD
MTX_FONTS_AUTOLOAD
== Fonts ==
See [[Fonts in LuaTex]]