-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: modify echolib.bat to minimize environment use and args check (#…
…117) - change to be similar as echoto.bat nethod - no more then 10 parameters are used - add arguments overflow check to echolib.bat - add arguments overflow check to echoto.bat
- Loading branch information
Showing
2 changed files
with
7 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
@echo off | ||
set FILE=%1 | ||
set STR=+%2 | ||
|
||
:loop | ||
shift | ||
if "%2" == "" goto end | ||
set STR=%STR% +%2 | ||
goto loop | ||
:end | ||
|
||
if "%2%3%4%5%6%7%8%9" == "" goto nothing | ||
set AMP=& | ||
if "%AMP%" == "" set AMP=^^^& | ||
|
||
echo %STR% %AMP%>> %FILE% | ||
echo %2 %3 %4 %5 %6 %7 %8 %9 %AMP%>>%1 | ||
shift | ||
if not "%9" == "" echo echolib.bat arguments overflow | ||
:nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
@echo off | ||
if "%2%3%4%5%6%7%8%9" == "" goto nothing | ||
echo %2 %3 %4 %5 %6 %7 %8 %9 >>%1 | ||
shift | ||
if not "%9" == "" echo echoto.bat arguments overflow | ||
:nothing |