private ResourceFile findScriptSourceFile(String scriptName) {
		if (scriptName.endsWith(".class")) {
			scriptName = scriptName.replace(".class", ".java");
		}
		ResourceFile scriptSource = new ResourceFile(scriptName);
		scriptSource = scriptSource.getCanonicalFile();
		if (scriptSource.exists()) {
			return scriptSource;
		}

		scriptSource = GhidraScriptUtil.findScriptByName(scriptName);
		if (scriptSource != null) {
			return scriptSource;
		}
		throw new IllegalArgumentException("Script not found: " + scriptName);
	}
Runs the specified script with the specified state.

@param scriptState  State representing environment variables that the script is able
		to access.
@param script  Script to be run.
@return  whether the script successfully completed running
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/GhidraScriptRunner.java