]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Updates the printing of echo for script commands to after the @ checking.
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 Nov 2011 18:58:25 +0000 (18:58 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 18 Nov 2011 18:58:25 +0000 (18:58 +0000)
The add and remove are really a move of the code block from before the @ parsing into the else block.

Signed-off-by: jcarsey
Reviewed-by: leegrosenbaum
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12741 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Application/Shell/Shell.c

index d266c826e9572d3f9f8caa152b942d82a6f660a4..05a3cb5b82bdae30eef6205b84c8a3796131339e 100644 (file)
@@ -1815,15 +1815,6 @@ RunScriptFileHandle (
         //\r
       } else {\r
         if (CommandLine3 != NULL && StrLen(CommandLine3) > 0) {\r
-          if (ShellCommandGetEchoState()) {\r
-            CurDir = ShellInfoObject.NewEfiShellProtocol->GetEnv(L"cwd");\r
-            if (CurDir != NULL && StrLen(CurDir) > 1) {\r
-              ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_CURDIR), ShellInfoObject.HiiHandle, CurDir);\r
-            } else {\r
-              ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_SHELL), ShellInfoObject.HiiHandle);\r
-            }\r
-            ShellPrintEx(-1, -1, L"%s\r\n", CommandLine2);\r
-          }\r
           if (CommandLine3[0] == L'@') {\r
             //\r
             // We need to save the current echo state\r
@@ -1838,6 +1829,15 @@ RunScriptFileHandle (
             //\r
             ShellCommandSetEchoState(PreCommandEchoState);\r
           } else {\r
+            if (ShellCommandGetEchoState()) {\r
+              CurDir = ShellInfoObject.NewEfiShellProtocol->GetEnv(L"cwd");\r
+              if (CurDir != NULL && StrLen(CurDir) > 1) {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_CURDIR), ShellInfoObject.HiiHandle, CurDir);\r
+              } else {\r
+                ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SHELL_SHELL), ShellInfoObject.HiiHandle);\r
+              }\r
+              ShellPrintEx(-1, -1, L"%s\r\n", CommandLine2);\r
+            }\r
             Status = RunCommand(CommandLine3);\r
           }\r
         }\r