private void ExecuteWindows(string tool, string[] toolArguments, bool openConsole = false) { var path = Path.GetFullPath(Path.Combine(_toolsLocation, "patchkit-tools.bat")); var processArguments = path + " " + tool; if (toolArguments != null) { processArguments += " "; foreach (string arg in toolArguments) { if (arg.Contains(' ')) { processArguments += "\"" + arg + "\" "; } else { processArguments += arg + " "; } } } var console = new TerminalWrapper(_platform); console.Launch(processArguments); }
private void ExecuteLinux(string tool, string[] toolArguments) { var path = Path.GetFullPath(Path.Combine(_toolsLocation, "patchkit-tools")); if (!File.Exists(path)) { throw new ArgumentException("Executable does not exist"); } string processArguments = "bash -c '" + path + " " + tool; if (toolArguments != null) { processArguments += " "; foreach (string arg in toolArguments) { if (arg.Contains(' ')) { processArguments += "\"" + arg + "\" "; } else { processArguments += arg + " "; } } } processArguments += "'"; var console = new TerminalWrapper(_platform); console.Launch(processArguments); }