2023-05-16 22:54:19 +02:00
|
|
|
|
public class Program {
|
2023-05-16 00:43:47 +02:00
|
|
|
|
static void Main(string[] args) {
|
|
|
|
|
|
2023-05-17 12:18:20 +02:00
|
|
|
|
if (args.Length == 0) {
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Red;
|
|
|
|
|
Console.WriteLine("Please specify an option.");
|
|
|
|
|
Console.ResetColor();
|
2023-05-17 14:52:30 +02:00
|
|
|
|
Console.WriteLine("Options are: checksum, countmd5, deletemd5, compareChecksums");
|
2023-05-17 12:18:20 +02:00
|
|
|
|
} else {
|
|
|
|
|
switch(args[0]) {
|
|
|
|
|
case "checksum":
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.WriteLine("Starting the checksum process.");
|
|
|
|
|
Console.ResetColor();
|
2023-05-16 00:43:47 +02:00
|
|
|
|
|
2023-05-17 12:18:20 +02:00
|
|
|
|
Chksum.doTheThing();
|
|
|
|
|
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.WriteLine("Checksum process finished");
|
|
|
|
|
Console.ResetColor();
|
|
|
|
|
break;
|
|
|
|
|
case "countmd5":
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.WriteLine("Counting md5 checksum files.");
|
|
|
|
|
Console.ResetColor();
|
|
|
|
|
|
|
|
|
|
Chksum.countAllMd5Checksums();
|
|
|
|
|
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.WriteLine("Finished counting all md5 checksum files.");
|
|
|
|
|
Console.ResetColor();
|
|
|
|
|
break;
|
|
|
|
|
case "deletemd5":
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.WriteLine("Deleting all md5 checksum files.");
|
|
|
|
|
Console.ResetColor();
|
|
|
|
|
|
|
|
|
|
Chksum.deleteAllMd5Checksums();
|
|
|
|
|
|
|
|
|
|
Console.ForegroundColor = ConsoleColor.Green;
|
|
|
|
|
Console.WriteLine("Deleted all md5 checksum files.");
|
|
|
|
|
Console.ResetColor();
|
|
|
|
|
break;
|
2023-05-17 14:52:30 +02:00
|
|
|
|
case "compareChecksums":
|
|
|
|
|
Chksum.compareChecksums();
|
|
|
|
|
break;
|
2023-05-17 12:18:20 +02:00
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-05-16 00:43:47 +02:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|