logger.trace("There are no post-install scripts for " + pkgCtx);
return;
}
for (ScriptType script : postInstallScripts)
{
ScriptProcessor scriptProcessor = new AntScriptProcessor();
// TODO: Can we just have one instance of the script processor to process
// all scripts? Stateful/stateless?
String scriptFileName = script.getName();
File root = pkgCtx.getPackageRoot();
File path = root;
if (script.getPath() != null)
{
path = new File(root, script.getPath());
}
File scriptFile = new File(path, scriptFileName);
if (!scriptFile.exists())
{
throw new PackageManagerException("Script file " + scriptFile + " for " + pkgCtx + " does not exist!");
}
scriptProcessor.processPostInstallScript(this.pkgMgrCtx, pkgCtx, scriptFile);
}
}