mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add migration task as cli verb
This commit is contained in:
parent
223b6d4e92
commit
aa2c81eb48
@ -19,7 +19,8 @@ namespace Wabbajack.CLI
|
||||
typeof(DeleteFile),
|
||||
typeof(Changelog),
|
||||
typeof(FindSimilar),
|
||||
typeof(BSADump)
|
||||
typeof(BSADump),
|
||||
typeof(MigrateGameFolderFiles)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ namespace Wabbajack.CLI
|
||||
(Changelog opts) => opts.Execute(),
|
||||
(FindSimilar opts) => opts.Execute(),
|
||||
(BSADump opts) => opts.Execute(),
|
||||
(MigrateGameFolderFiles opts) => opts.Execute(),
|
||||
errs => 1);
|
||||
}
|
||||
}
|
||||
|
25
Wabbajack.CLI/Verbs/MigrateGameFolderFiles.cs
Normal file
25
Wabbajack.CLI/Verbs/MigrateGameFolderFiles.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System.Threading.Tasks;
|
||||
using CommandLine;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Lib.Tasks;
|
||||
|
||||
namespace Wabbajack.CLI.Verbs
|
||||
{
|
||||
[Verb("migrate-game-folder", HelpText = "Migrates game files into the 'Game Folder Files' in a MO2 directory")]
|
||||
public class MigrateGameFolderFiles : AVerb
|
||||
{
|
||||
[IsDirectory(CustomMessage = "Downloads folder at %1 does not exist!")]
|
||||
[Option('i', "input", HelpText = "Input Mod Organizer 2 Folder", Required = true)]
|
||||
public string MO2Folder { get; set; } = "";
|
||||
|
||||
|
||||
protected override async Task<ExitCode> Run()
|
||||
{
|
||||
if (await MigrateGameFolder.Execute((AbsolutePath)MO2Folder))
|
||||
{
|
||||
return ExitCode.Ok;
|
||||
};
|
||||
return ExitCode.Error;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user