mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 14:55:41 +02:00
[290743] [dstore][shells] allow bash shells and custom shell invocation
This commit is contained in:
parent
2736805097
commit
5fb4c2106f
1 changed files with 30 additions and 21 deletions
|
@ -22,6 +22,7 @@
|
||||||
* David McKnight (IBM) [153275] [dstore-shells] Ctrl+C does not break remote program
|
* David McKnight (IBM) [153275] [dstore-shells] Ctrl+C does not break remote program
|
||||||
* David McKnight (IBM) [284179] [dstore] commands have a hard coded line length limit of 100 characters
|
* David McKnight (IBM) [284179] [dstore] commands have a hard coded line length limit of 100 characters
|
||||||
* David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences
|
* David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences
|
||||||
|
* David McKnight (IBM) [290743] [dstore][shells] allow bash shells and custom shell invocation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.dstore.universal.miners.command;
|
package org.eclipse.rse.internal.dstore.universal.miners.command;
|
||||||
|
@ -199,9 +200,6 @@ public class CommandMinerThread extends MinerThread
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
isBash = true;
|
isBash = true;
|
||||||
// no bash!
|
|
||||||
theShell = "sh"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (theShell.endsWith("sh") && isZ)//$NON-NLS-1$
|
else if (theShell.endsWith("sh") && isZ)//$NON-NLS-1$
|
||||||
|
@ -220,6 +218,11 @@ public class CommandMinerThread extends MinerThread
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check for custom shell invocation
|
||||||
|
String customShellInvocation = System.getProperty("DSTORE_SHELL_INVOCATION"); //$NON-NLS-1$
|
||||||
|
if (customShellInvocation != null && customShellInvocation.length() > 0){
|
||||||
|
theShell = customShellInvocation;
|
||||||
|
}
|
||||||
|
|
||||||
if (theShell == null)
|
if (theShell == null)
|
||||||
{
|
{
|
||||||
|
@ -320,25 +323,31 @@ public class CommandMinerThread extends MinerThread
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (isBashonZ)
|
if (customShellInvocation != null && customShellInvocation.length() > 0){
|
||||||
{
|
// all handled in the custom shell invocation
|
||||||
_theProcess = Runtime.getRuntime().exec(_invocation + " --login", env, theDirectory); //$NON-NLS-1$
|
|
||||||
didLogin = true;
|
|
||||||
}
|
|
||||||
else if (isBash)
|
|
||||||
{
|
|
||||||
_theProcess = Runtime.getRuntime().exec(_invocation + " -l", env, theDirectory); //$NON-NLS-1$
|
|
||||||
didLogin = true;
|
|
||||||
}
|
|
||||||
else if (isSHonZ)
|
|
||||||
{
|
|
||||||
_theProcess = Runtime.getRuntime().exec(_invocation + " -L", env, theDirectory); //$NON-NLS-1$
|
|
||||||
didLogin = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
|
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (isBashonZ)
|
||||||
|
{
|
||||||
|
_theProcess = Runtime.getRuntime().exec(_invocation + " --login", env, theDirectory); //$NON-NLS-1$
|
||||||
|
didLogin = true;
|
||||||
|
}
|
||||||
|
else if (isBash)
|
||||||
|
{
|
||||||
|
_theProcess = Runtime.getRuntime().exec(_invocation + " -l", env, theDirectory); //$NON-NLS-1$
|
||||||
|
didLogin = true;
|
||||||
|
}
|
||||||
|
else if (isSHonZ)
|
||||||
|
{
|
||||||
|
_theProcess = Runtime.getRuntime().exec(_invocation + " -L", env, theDirectory); //$NON-NLS-1$
|
||||||
|
didLogin = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_theProcess = Runtime.getRuntime().exec(_invocation, env, theDirectory);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue