public static Script parseGroovyShellScript(final Map inputVariables, final String script) {
        val variables = inputVariables != null ? new HashMap<>(inputVariables) : new HashMap<>();
        variables.putIfAbsent("logger", LOGGER);
        val binding = new Binding(variables);
        val shell = new GroovyShell(binding, GROOVY_COMPILER_CONFIG);
        LOGGER.debug("Parsing groovy script [{}]", script);
        return shell.parse(script, binding);
    }
Parse groovy shell script.

@param script the script
@return the script
core/cas-server-core-scripting/src/main/java/org/apereo/cas/util/scripting/ScriptingUtils.java