jenkins.plugins.shiningpanda.command
Class UnixCommand

java.lang.Object
  extended by jenkins.plugins.shiningpanda.command.Command
      extended by jenkins.plugins.shiningpanda.command.ShellCommand
          extended by jenkins.plugins.shiningpanda.command.UnixCommand

public class UnixCommand
extends ShellCommand


Field Summary
 
Fields inherited from class jenkins.plugins.shiningpanda.command.ShellCommand
convert
 
Constructor Summary
protected UnixCommand(String command, boolean ignoreExitCode, boolean convert)
          Constructor using fields.
 
Method Summary
protected static String addCrForNonASCII(String contents)
          Add a leading line for old shell compatibility.
protected  hudson.util.ArgumentListBuilder getArguments(hudson.FilePath script)
          Get the command line to execute.
protected  String getExtension()
          Get the extension of the script file.
protected static String getShell(hudson.remoting.VirtualChannel channel)
          Get a shell
protected  String getSourceContent()
          Get the script content before potential conversions.
protected  String getSourceSeparator()
          Get the separator to replace during conversion.
protected  Pattern getSourceVariable()
          Get the variable pattern.
protected  String getTargetSeparator()
          Get the separator.
protected  String getTargetVariable()
          Get the variable replacement pattern.
 
Methods inherited from class jenkins.plugins.shiningpanda.command.ShellCommand
getContents, getEnvironment
 
Methods inherited from class jenkins.plugins.shiningpanda.command.Command
createScriptFile, get, getCommand, isExitCodeIgnored, launch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnixCommand

protected UnixCommand(String command,
                      boolean ignoreExitCode,
                      boolean convert)
Constructor using fields.

Parameters:
command - The content of the execution script
ignoreExitCode - Is exit code ignored?
convert - Convert batch to shell
Method Detail

getExtension

protected String getExtension()
Description copied from class: Command
Get the extension of the script file.

Specified by:
getExtension in class Command
Returns:
The extension

getSourceContent

protected String getSourceContent()
Description copied from class: ShellCommand
Get the script content before potential conversions.

Specified by:
getSourceContent in class ShellCommand
Returns:
The contents

getSourceSeparator

protected String getSourceSeparator()
Description copied from class: ShellCommand
Get the separator to replace during conversion.

Specified by:
getSourceSeparator in class ShellCommand
Returns:
The separator

getTargetSeparator

protected String getTargetSeparator()
Description copied from class: ShellCommand
Get the separator.

Specified by:
getTargetSeparator in class ShellCommand
Returns:
The separator

getSourceVariable

protected Pattern getSourceVariable()
Description copied from class: ShellCommand
Get the variable pattern.

Specified by:
getSourceVariable in class ShellCommand
Returns:
The variable pattern

getTargetVariable

protected String getTargetVariable()
Description copied from class: ShellCommand
Get the variable replacement pattern.

Specified by:
getTargetVariable in class ShellCommand
Returns:
The variable replacement pattern

getArguments

protected hudson.util.ArgumentListBuilder getArguments(hudson.FilePath script)
Description copied from class: Command
Get the command line to execute.

Specified by:
getArguments in class Command
Parameters:
script - The script to execute
Returns:
The arguments

addCrForNonASCII

protected static String addCrForNonASCII(String contents)
Add a leading line for old shell compatibility.

Parameters:
contents - The string to fix
Returns:
The fixed string

getShell

protected static String getShell(hudson.remoting.VirtualChannel channel)
Get a shell

Parameters:
channel - The channel
Returns:
The shell to use to launch the script file


Copyright © 2004-2012. All Rights Reserved.