mirror of https://github.com/acidanthera/audk.git
This adds support for @ prefixed commands in script files.
signed-off-by: jcarsey reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12113 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
37abfb7ea1
commit
848997b59a
|
@ -1619,6 +1619,7 @@ RunScriptFileHandle (
|
|||
SCRIPT_COMMAND_LIST *LastCommand;
|
||||
BOOLEAN Ascii;
|
||||
BOOLEAN PreScriptEchoState;
|
||||
BOOLEAN PreCommandEchoState;
|
||||
CONST CHAR16 *CurDir;
|
||||
UINTN LineCount;
|
||||
|
||||
|
@ -1806,8 +1807,23 @@ RunScriptFileHandle (
|
|||
}
|
||||
ShellPrintEx(-1, -1, L"%s\r\n", CommandLine2);
|
||||
}
|
||||
if (CommandLine3[0] == L'@') {
|
||||
//
|
||||
// We need to save the current echo state
|
||||
// and disable echo for just this command.
|
||||
//
|
||||
PreCommandEchoState = ShellCommandGetEchoState();
|
||||
ShellCommandSetEchoState(FALSE);
|
||||
Status = RunCommand(CommandLine3+1);
|
||||
|
||||
//
|
||||
// Now restore the pre-'@' echo state.
|
||||
//
|
||||
ShellCommandSetEchoState(PreCommandEchoState);
|
||||
} else {
|
||||
Status = RunCommand(CommandLine3);
|
||||
}
|
||||
}
|
||||
|
||||
if (ShellCommandGetScriptExit()) {
|
||||
ShellCommandRegisterExit(FALSE);
|
||||
|
|
Loading…
Reference in New Issue