You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/Ombi.Updater/Program.cs

41 lines
994 B

using System;
8 years ago
using System.Linq;
using System.Windows.Forms;
using Ombi.Common.Processes;
8 years ago
namespace Ombi.Updater
{
class MainClass
{
public static void Main (string[] args)
{
8 years ago
var i = new InstallService();
var context = ParseArgs(args);
i.Start(context);
//Console.WriteLine ("Starting Ombi updater");
// var s = new Updater();
// if (args.Length >= 2)
// {
// s.Start(args[0], args[1]);
// }
// else
// {
// s.Start(args[0], string.Empty);
// }
}
8 years ago
private static UpdateStartupContext ParseArgs(string[] args)
{
var proc = new ProcessProvider();
var ombiProc = proc.FindProcessByName("Ombi").FirstOrDefault().Id;
return new UpdateStartupContext
{
DownloadPath = args[0],
ProcessId = ombiProc,
StartupArgs = args.Length > 1 ? args[1] : string.Empty
};
}
}
}