Скрипт для обновления apertium
using System.IO;
using System.Diagnostics;
Console.WriteLine("==========");
Console.WriteLine("Обновление apertium-kaz/");
Console.WriteLine("==========");
Process cmd = new Process();
cmd.StartInfo.WorkingDirectory = "/home/zhake/Apertium/Source/apertium-kaz/";
cmd.StartInfo.FileName = "bash";
cmd.StartInfo.Arguments = "-c 'svn up'";
cmd.StartInfo.RedirectStandardOutput = true;
cmd.StartInfo.RedirectStandardError = true;
cmd.StartInfo.UseShellExecute = false;
if(cmd.Start()){
cmd.WaitForExit();
}
Console.Write(cmd.StandardOutput.ReadToEnd());
Console.WriteLine("==========");
Console.WriteLine("Обновление apertium-eng-kaz/");
Console.WriteLine("==========");
cmd.StartInfo.WorkingDirectory = "/home/zhake/Apertium/Source/apertium-eng-kaz/";
if(cmd.Start()){
cmd.WaitForExit();
}
Console.Write(cmd.StandardOutput.ReadToEnd());
Console.WriteLine("==========");
Console.WriteLine("Компиляция apertium-kaz/");
Console.WriteLine("==========");
cmd.StartInfo.WorkingDirectory = "/home/zhake/Apertium/Source/apertium-kaz/";
cmd.StartInfo.Arguments = "-c 'make'";
if(cmd.Start()){
cmd.WaitForExit();
}
Console.Write(cmd.StandardOutput.ReadToEnd());
Console.WriteLine("==========");
Console.WriteLine("Компиляция apertium-eng-kaz/");
Console.WriteLine("==========");
cmd.StartInfo.WorkingDirectory = "/home/zhake/Apertium/Source/apertium-eng-kaz/";
cmd.StartInfo.Arguments = "-c 'make'";
if(cmd.Start()){
cmd.WaitForExit();
}
Console.Write(cmd.StandardOutput.ReadToEnd());
Console.WriteLine("==========");
Console.WriteLine("Обновление и компиляция завершены.");
Console.WriteLine("==========");