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

View File

@@ -15,7 +15,7 @@ internal object MainCommand : Runnable {
@Parameters( @Parameters(
paramLabel = "INCLUDE", 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>() internal var includedPatches = arrayOf<String>()
@@ -25,6 +25,10 @@ internal object MainCommand : Runnable {
@Option(names = ["-r", "--resource-patcher"], description = ["Enable patching resources"]) @Option(names = ["-r", "--resource-patcher"], description = ["Enable patching resources"])
internal var patchResources: Boolean = false 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"]) @Option(names = ["-l", "--list"], description = ["List patches only"])
internal var listOnly: Boolean = false internal var listOnly: Boolean = false
@@ -49,6 +53,9 @@ internal object MainCommand : Runnable {
} }
Patcher.run() Patcher.run()
if (!wipe) return
File(cacheDirectory).deleteRecursively()
} }
} }