ported grappa configure script to shell