split script and glob into defines