mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
Added: Add labels for ExecutionCommand for termux internal commands
This commit is contained in:
@@ -260,6 +260,7 @@ public class TermuxFileUtils {
|
|||||||
|
|
||||||
// Run script
|
// Run script
|
||||||
ExecutionCommand executionCommand = new ExecutionCommand(1, "/system/bin/sh", null, statScript.toString() + "\n", "/", true, true);
|
ExecutionCommand executionCommand = new ExecutionCommand(1, "/system/bin/sh", null, statScript.toString() + "\n", "/", true, true);
|
||||||
|
executionCommand.commandLabel = TermuxConstants.TERMUX_APP_NAME + " Files Stat Command";
|
||||||
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;
|
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;
|
||||||
TermuxTask termuxTask = TermuxTask.execute(context, executionCommand, null, new TermuxShellEnvironmentClient(), true);
|
TermuxTask termuxTask = TermuxTask.execute(context, executionCommand, null, new TermuxShellEnvironmentClient(), true);
|
||||||
if (termuxTask == null || !executionCommand.isSuccessful()) {
|
if (termuxTask == null || !executionCommand.isSuccessful()) {
|
||||||
|
@@ -341,6 +341,7 @@ public class TermuxUtils {
|
|||||||
aptInfoScript = aptInfoScript.replaceAll(Pattern.quote("@TERMUX_PREFIX@"), TermuxConstants.TERMUX_PREFIX_DIR_PATH);
|
aptInfoScript = aptInfoScript.replaceAll(Pattern.quote("@TERMUX_PREFIX@"), TermuxConstants.TERMUX_PREFIX_DIR_PATH);
|
||||||
|
|
||||||
ExecutionCommand executionCommand = new ExecutionCommand(1, TermuxConstants.TERMUX_BIN_PREFIX_DIR_PATH + "/bash", null, aptInfoScript, null, true, false);
|
ExecutionCommand executionCommand = new ExecutionCommand(1, TermuxConstants.TERMUX_BIN_PREFIX_DIR_PATH + "/bash", null, aptInfoScript, null, true, false);
|
||||||
|
executionCommand.commandLabel = "APT Info Command";
|
||||||
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;
|
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;
|
||||||
TermuxTask termuxTask = TermuxTask.execute(context, executionCommand, null, new TermuxShellEnvironmentClient(), true);
|
TermuxTask termuxTask = TermuxTask.execute(context, executionCommand, null, new TermuxShellEnvironmentClient(), true);
|
||||||
if (termuxTask == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0) {
|
if (termuxTask == null || !executionCommand.isSuccessful() || executionCommand.resultData.exitCode != 0) {
|
||||||
@@ -398,6 +399,7 @@ public class TermuxUtils {
|
|||||||
// Run script
|
// Run script
|
||||||
// Logging must be disabled for output of logcat command itself in StreamGobbler
|
// Logging must be disabled for output of logcat command itself in StreamGobbler
|
||||||
ExecutionCommand executionCommand = new ExecutionCommand(1, "/system/bin/sh", null, logcatScript + "\n", "/", true, true);
|
ExecutionCommand executionCommand = new ExecutionCommand(1, "/system/bin/sh", null, logcatScript + "\n", "/", true, true);
|
||||||
|
executionCommand.commandLabel = "Logcat dump command";
|
||||||
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;
|
executionCommand.backgroundCustomLogLevel = Logger.LOG_LEVEL_OFF;
|
||||||
TermuxTask termuxTask = TermuxTask.execute(context, executionCommand, null, new TermuxShellEnvironmentClient(), true);
|
TermuxTask termuxTask = TermuxTask.execute(context, executionCommand, null, new TermuxShellEnvironmentClient(), true);
|
||||||
if (termuxTask == null || !executionCommand.isSuccessful()) {
|
if (termuxTask == null || !executionCommand.isSuccessful()) {
|
||||||
|
Reference in New Issue
Block a user