From 5e74b2443989be1348cae0730f35f8919024dda1 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Sun, 11 Jul 2021 20:04:12 +0100 Subject: [PATCH] refact & client install notes --- README.md | 16 +++++++++++++--- src/isn/Program.cs | 21 +++++++++++---------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fcea029..9c3eee9 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,20 @@ sudo systemctl enable isnd Installer le client : ````bash -sudo cp -a src/isn/bin/Release/net472/ /usr/local/lib/isn +sudo cp -a src/isn/bin/Release/net472/* /usr/local/lib/isn sudo chown -R root.root /usr/local/lib/isn sudo chmod +x /usr/local/lib/isn/isn.exe -sudo cp contrib/isn /usr/local/bin -sudo chmod +x /usr/local/bin +sudo rm -f /usr/local/bin/isn +sudo cp contrib/isn /usr/local/bin/isn +sudo chmod +x /usr/local/bin/isn sudo chown root.root /usr/local/bin/isn ```` + +## TODO + +````bash +isn add +isn set-api-key +isn sources +```` + diff --git a/src/isn/Program.cs b/src/isn/Program.cs index 452ec26..05087d9 100644 --- a/src/isn/Program.cs +++ b/src/isn/Program.cs @@ -34,7 +34,7 @@ namespace nuget_cli { "h|help", "show this message and exit", h => shouldShowSourceHelp = h != null }, }; - var commandSet = new CommandSet("yaget-cli"); + var commandSet = new CommandSet("isn"); var srclst = new Command("list") @@ -45,27 +45,28 @@ namespace nuget_cli { Run = sargs => SourceAdd(sargs) }; - var srcCmd = new Command("source") + var srcCmd = new Command("sources") { Run = sargs => { + + var sourcesCmdSet = new CommandSet("sources") + { + srclst, + srcadd + }; var pargs = sourceoptions.Parse(sargs); if (shouldShowSourceHelp) { // output the options - Console.WriteLine("Push Options:"); + Console.WriteLine("Sources Options:"); sourceoptions.WriteOptionDescriptions(Console.Out); return; } + sourcesCmdSet.Run(pargs); } }; - var sourceCmdSet = new CommandSet("source") - { - srclst, - srcadd - }; - var add = new Command("add") { Run = sargs => Add(sargs) @@ -96,7 +97,7 @@ namespace nuget_cli Run = sargs => StoreApiKey(sargs) }; commandSet.Add(setapikey); - + commandSet.Add(srcCmd); List extra; try