mirror of
https://github.com/revanced/revanced-cli.git
synced 2024-12-11 20:57:49 +01:00
feat: remove unused option -r
This commit is contained in:
parent
65637c8b3a
commit
467d8387e6
@ -92,9 +92,6 @@ internal object MainCommand : Runnable {
|
|||||||
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
@Option(names = ["-i", "--include"], description = ["Include patches"])
|
||||||
var includedPatches = arrayOf<String>()
|
var includedPatches = arrayOf<String>()
|
||||||
|
|
||||||
@Option(names = ["-r", "--resource-patcher"], description = ["Disable patching resources"])
|
|
||||||
var disableResourcePatching: Boolean = false
|
|
||||||
|
|
||||||
@Option(names = ["--experimental"], description = ["Disable patch version compatibility patch"])
|
@Option(names = ["--experimental"], description = ["Disable patch version compatibility patch"])
|
||||||
var experimental: Boolean = false
|
var experimental: Boolean = false
|
||||||
|
|
||||||
@ -143,7 +140,6 @@ internal object MainCommand : Runnable {
|
|||||||
PatcherOptions(
|
PatcherOptions(
|
||||||
args.inputFile,
|
args.inputFile,
|
||||||
pArgs.cacheDirectory,
|
pArgs.cacheDirectory,
|
||||||
!pArgs.disableResourcePatching,
|
|
||||||
pArgs.aaptPath,
|
pArgs.aaptPath,
|
||||||
pArgs.cacheDirectory,
|
pArgs.cacheDirectory,
|
||||||
PatcherLogger
|
PatcherLogger
|
||||||
@ -210,19 +206,13 @@ internal object MainCommand : Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun uninstall() {
|
private fun uninstall() {
|
||||||
// temporarily get package name using Patcher method
|
val adb: Adb? = args.deploy?.let {
|
||||||
// fix: abstract options in patcher
|
Adb(
|
||||||
val patcher = app.revanced.patcher.Patcher(
|
File("placeholder_file"),
|
||||||
PatcherOptions(
|
app.revanced.patcher.Patcher(PatcherOptions(args.inputFile, "")).data.packageMetadata.packageName,
|
||||||
args.inputFile,
|
args.deploy!!,
|
||||||
"uninstaller-cache",
|
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
)
|
|
||||||
File("uninstaller-cache").deleteRecursively()
|
|
||||||
|
|
||||||
val adb: Adb? = args.deploy?.let {
|
|
||||||
Adb(File("placeholder_file"), patcher.data.packageMetadata.packageName, args.deploy!!, false)
|
|
||||||
}
|
}
|
||||||
adb?.uninstall()
|
adb?.uninstall()
|
||||||
}
|
}
|
||||||
|
@ -35,10 +35,10 @@ internal object Patcher {
|
|||||||
outputFileSystem.write(it.name, it.stream.readAllBytes())
|
outputFileSystem.write(it.name, it.stream.readAllBytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!args.disableResourcePatching) {
|
result.resourceFile?.let {
|
||||||
logger.info("Writing resources...")
|
logger.info("Writing resources...")
|
||||||
|
|
||||||
ZipFileSystemUtils(result.resourceFile!!).use { resourceFileSystem ->
|
ZipFileSystemUtils(it).use { resourceFileSystem ->
|
||||||
val resourceFiles = resourceFileSystem.getFile(File.separator)
|
val resourceFiles = resourceFileSystem.getFile(File.separator)
|
||||||
outputFileSystem.writePathRecursively(resourceFiles)
|
outputFileSystem.writePathRecursively(resourceFiles)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user