Class BourneShell

java.lang.Object
org.apache.maven.shared.utils.cli.shell.Shell
org.apache.maven.shared.utils.cli.shell.BourneShell
All Implemented Interfaces:
Cloneable

public class BourneShell extends Shell
Author:
Jason van Zyl
  • Constructor Details

    • BourneShell

      public BourneShell()
      Create instance of BourneShell.
  • Method Details

    • getExecutable

      public String getExecutable()
      Overrides:
      getExecutable in class Shell
      Returns:
      The executable.
    • getShellArgsList

      public List<String> getShellArgsList()
    • getShellArgs

      public String[] getShellArgs()
    • getExecutionPreamble

      protected String getExecutionPreamble()
    • quoteOneItem

      protected String quoteOneItem(String path, boolean isExecutable)

      Unify quotes in a path for the Bourne Shell.

       BourneShell.quoteOneItem(null)                       = null
       BourneShell.quoteOneItem("")                         = ''
       BourneShell.quoteOneItem("/test/quotedpath'abc")     = '/test/quotedpath'"'"'abc'
       BourneShell.quoteOneItem("/test/quoted path'abc")    = '/test/quoted pat'"'"'habc'
       BourneShell.quoteOneItem("/test/quotedpath\"abc")    = '/test/quotedpath"abc'
       BourneShell.quoteOneItem("/test/quoted path\"abc")   = '/test/quoted path"abc'
       BourneShell.quoteOneItem("/test/quotedpath\"'abc")   = '/test/quotedpath"'"'"'abc'
       BourneShell.quoteOneItem("/test/quoted path\"'abc")  = '/test/quoted path"'"'"'abc'
       
      Overrides:
      quoteOneItem in class Shell
      Parameters:
      path - not null path.
      Returns:
      the path unified correctly for the Bourne shell.