gnats build script

please review