mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Create a Help section
This commit is contained in:
@@ -9,6 +9,8 @@ namespace Update
|
|||||||
{
|
{
|
||||||
class Program
|
class Program
|
||||||
{
|
{
|
||||||
|
static OptionSet opts;
|
||||||
|
|
||||||
static int Main(string[] args)
|
static int Main(string[] args)
|
||||||
{
|
{
|
||||||
if (args.Any(x => x.StartsWith("/squirrel", StringComparison.OrdinalIgnoreCase))) {
|
if (args.Any(x => x.StartsWith("/squirrel", StringComparison.OrdinalIgnoreCase))) {
|
||||||
@@ -17,8 +19,12 @@ namespace Update
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
var opts = new OptionSet() {
|
opts = new OptionSet() {
|
||||||
{ "h|?|help", v => ShowHelp() }
|
"Usage: Update.exe command [OPTS]",
|
||||||
|
"Manages Squirrel packages",
|
||||||
|
"",
|
||||||
|
"Options:",
|
||||||
|
{ "h|?|help", "Display Help and exit", v => ShowHelp() }
|
||||||
};
|
};
|
||||||
|
|
||||||
opts.Parse(args);
|
opts.Parse(args);
|
||||||
@@ -28,7 +34,8 @@ namespace Update
|
|||||||
|
|
||||||
static void ShowHelp()
|
static void ShowHelp()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Help!");
|
opts.WriteOptionDescriptions(Console.Out);
|
||||||
|
Environment.Exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user