[Build] Add help text for TGZTest; add logging

This commit is contained in:
Matt Nadareski
2016-08-25 10:36:15 -07:00
parent 0e4b76f1b3
commit c29fa008b5
2 changed files with 15 additions and 0 deletions

View File

@@ -248,6 +248,17 @@ SimpleSort scanning levels:
2 Only hash archive
");
break;
case "TGZTest":
Console.WriteLine(@"TGZTest - Test TorrentGZ output
-----------------------------------------
Usage: TGZTest [options] [filename|dirname] ...
Options:
-?, -h, --help Show this help
-out= Output directory
-d, --delete Delete input files
-r, --romba Enable Romba depot dir output");
break;
default:
Console.Write("This is the default help output");
break;

View File

@@ -14,6 +14,8 @@ namespace SabreTools
private bool _romba;
private Logger _logger;
// We still need access permissions for each of the archive files as well, kind of like DATFromDir
/// <summary>
/// Create a new TGZTest object
/// </summary>
@@ -186,11 +188,13 @@ namespace SabreTools
{
foreach (string input in _inputs)
{
_logger.User("Processing file " + input);
ArchiveTools.WriteTorrentGZ(input, _outdir, _romba, _logger);
if (_delete)
{
try
{
_logger.User("Attempting to delete " + input);
File.Delete(input);
}
catch (Exception ex)