mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Add option to remove Date from generated name
This commit is contained in:
@@ -29,6 +29,7 @@ namespace SabreTools
|
|||||||
// User specified variables
|
// User specified variables
|
||||||
private static bool _noMD5;
|
private static bool _noMD5;
|
||||||
private static bool _noSHA1;
|
private static bool _noSHA1;
|
||||||
|
private static bool _noDate;
|
||||||
private static bool _forceunzip;
|
private static bool _forceunzip;
|
||||||
private static bool _allfiles;
|
private static bool _allfiles;
|
||||||
private static bool _old;
|
private static bool _old;
|
||||||
@@ -75,6 +76,10 @@ namespace SabreTools
|
|||||||
case "--noSHA1":
|
case "--noSHA1":
|
||||||
_noSHA1 = true;
|
_noSHA1 = true;
|
||||||
break;
|
break;
|
||||||
|
case "-b":
|
||||||
|
case "--bare":
|
||||||
|
_noDate = true;
|
||||||
|
break;
|
||||||
case "-u":
|
case "-u":
|
||||||
case "--unzip":
|
case "--unzip":
|
||||||
_forceunzip = true;
|
_forceunzip = true;
|
||||||
@@ -173,7 +178,7 @@ namespace SabreTools
|
|||||||
string[] splitPath = _basePath.Split(Path.DirectorySeparatorChar);
|
string[] splitPath = _basePath.Split(Path.DirectorySeparatorChar);
|
||||||
_name = (_name == "" ? (inputs.Count > 1 ? Environment.CurrentDirectory.Split(Path.DirectorySeparatorChar).Last() :
|
_name = (_name == "" ? (inputs.Count > 1 ? Environment.CurrentDirectory.Split(Path.DirectorySeparatorChar).Last() :
|
||||||
(_basePath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? splitPath[splitPath.Length - 2] : splitPath.Last())) : _name);
|
(_basePath.EndsWith(Path.DirectorySeparatorChar.ToString()) ? splitPath[splitPath.Length - 2] : splitPath.Last())) : _name);
|
||||||
_desc = (_desc == "" ? _name + " (" + _date + ")" : _desc);
|
_desc = (_desc == "" ? _name + (_noDate ? "" : " (" + _date + ")") : _desc);
|
||||||
|
|
||||||
// Now write it all out as a DAT
|
// Now write it all out as a DAT
|
||||||
try
|
try
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ Options:
|
|||||||
-h, -?, --help Show this help dialog
|
-h, -?, --help Show this help dialog
|
||||||
-m, --noMD5 Don't include MD5 in output
|
-m, --noMD5 Don't include MD5 in output
|
||||||
-s, --noSHA1 Don't include SHA1 in output
|
-s, --noSHA1 Don't include SHA1 in output
|
||||||
|
-b, --bare Don't include date in file name
|
||||||
-u, --unzip Force unzipping in created DAT
|
-u, --unzip Force unzipping in created DAT
|
||||||
-f, --files Treat archives as files
|
-f, --files Treat archives as files
|
||||||
-o, --old Output DAT in RV format instead of XML
|
-o, --old Output DAT in RV format instead of XML
|
||||||
|
|||||||
Reference in New Issue
Block a user