ToolsInstaller: unbreak cleanup

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-10-27 13:35:07 +01:00
parent 755148242c
commit e71b3d2583

View File

@ -143,7 +143,7 @@ public final class ToolsInstaller {
extract(); extract();
final StringBuilder script = new StringBuilder("set -ex; "); final StringBuilder script = new StringBuilder("set -ex; ");
script.append("trap 'rm -rf /data/adb/moduleswireguard' INT TERM EXIT; "); script.append("trap 'rm -rf /data/adb/modules/wireguard' INT TERM EXIT; ");
script.append(String.format("rm -rf /data/adb/modules/wireguard/; mkdir -p /data/adb/modules/wireguard%s; ", INSTALL_DIR)); script.append(String.format("rm -rf /data/adb/modules/wireguard/; mkdir -p /data/adb/modules/wireguard%s; ", INSTALL_DIR));
script.append("printf 'name=WireGuard Command Line Tools\nversion=1.0\nversionCode=1\nauthor=zx2c4\ndescription=Command line tools for WireGuard\nminMagisk=1500\n' > /data/adb/modules/wireguard/module.prop; "); script.append("printf 'name=WireGuard Command Line Tools\nversion=1.0\nversionCode=1\nauthor=zx2c4\ndescription=Command line tools for WireGuard\nminMagisk=1500\n' > /data/adb/modules/wireguard/module.prop; ");
script.append("touch /data/adb/modules/wireguard/auto_mount; "); script.append("touch /data/adb/modules/wireguard/auto_mount; ");