2016-08-21 17:29:27 +02:00
|
|
|
using System;
|
|
|
|
using System.Text;
|
2016-08-21 18:06:28 +02:00
|
|
|
using System.Linq;
|
2016-08-21 19:03:43 +02:00
|
|
|
using System.IO;
|
2016-08-21 17:29:27 +02:00
|
|
|
|
2016-08-21 17:38:03 +02:00
|
|
|
public static class Program
|
2016-08-21 17:29:27 +02:00
|
|
|
{
|
2016-08-21 19:03:43 +02:00
|
|
|
const string defaultSteamGuardPath = "~/maFiles";
|
|
|
|
|
|
|
|
public static string SteamGuardPath { get; set; } = defaultSteamGuardPath;
|
|
|
|
|
2016-08-21 17:38:03 +02:00
|
|
|
/// <summary>
|
|
|
|
/// The main entry point for the application
|
|
|
|
/// </summary>
|
|
|
|
[STAThread]
|
|
|
|
public static void Main(string[] args)
|
2016-08-21 17:34:48 +02:00
|
|
|
{
|
2016-08-21 17:38:03 +02:00
|
|
|
if (args.Contains("--help") || args.Contains("-h"))
|
|
|
|
{
|
|
|
|
Console.WriteLine("steamguard-cli - v0.0");
|
|
|
|
Console.WriteLine();
|
|
|
|
Console.WriteLine("--help, -h Display this help message.");
|
2016-08-21 19:03:43 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SteamGuardPath = SteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME"));
|
|
|
|
if (!Directory.Exists(SteamGuardPath))
|
|
|
|
{
|
|
|
|
if (SteamGuardPath == defaultSteamGuardPath.Replace("~", Environment.GetEnvironmentVariable("HOME")))
|
|
|
|
{
|
|
|
|
Console.WriteLine("warn: {0} does not exist, creating...", SteamGuardPath);
|
|
|
|
Directory.CreateDirectory(SteamGuardPath);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Console.WriteLine("error: {0} does not exist.", SteamGuardPath);
|
|
|
|
return;
|
|
|
|
}
|
2016-08-21 17:38:03 +02:00
|
|
|
}
|
2016-08-21 17:34:48 +02:00
|
|
|
}
|
2016-08-21 17:29:27 +02:00
|
|
|
}
|