if (script == null) {
return null;
}
IFileHandle workingDir = script.getParent();
InterpreterConfig config = ScriptLaunchUtil.createInterpreterConfig(exeEnv, script, workingDir,
environment);
String names = packageName;
ByteArrayInputStream bais = new ByteArrayInputStream(names.getBytes());
IPath packagesPath = null;
try {
packagesPath = deployment.add(bais, "packages.txt"); //$NON-NLS-1$
} catch (IOException e1) {
if (DLTKCore.DEBUG) {
e1.printStackTrace();
}
return null;
}
IFileHandle file = deployment.getFile(packagesPath);
// For wish
config.removeEnvVar("DISPLAY"); //$NON-NLS-1$
String[] arguments = new String[] { "get-srcs", "-fpkgs", //$NON-NLS-1$ //$NON-NLS-2$
file.toOSString() };
config.addScriptArgs(arguments);
Process process = null;
try {
process = ScriptLaunchUtil.runScriptWithInterpreter(exeEnv, installLocation.toOSString(),
config);