add: wipe-after option

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX 2022-05-04 23:56:30 +02:00
parent 57af32208d
commit 03f2c5185e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -15,7 +15,7 @@ internal object MainCommand : Runnable {
@Parameters(
paramLabel = "INCLUDE",
description = ["Which patches to include. If none is specified, all compatible patches will be included."]
description = ["Which patches to include. If none is specified, all compatible patches will be included"]
)
internal var includedPatches = arrayOf<String>()
@ -25,6 +25,10 @@ internal object MainCommand : Runnable {
@Option(names = ["-r", "--resource-patcher"], description = ["Enable patching resources"])
internal var patchResources: Boolean = false
@Option(names = ["-w", "--wipe-after"], description = ["Wipe the temporal directory before exiting the patcher"])
internal var wipe: Boolean = false
@Option(names = ["-l", "--list"], description = ["List patches only"])
internal var listOnly: Boolean = false
@ -49,6 +53,9 @@ internal object MainCommand : Runnable {
}
Patcher.run()
if (!wipe) return
File(cacheDirectory).deleteRecursively()
}
}