diff options
author | Steve Holme <steve_holme@hotmail.com> | 2015-08-09 17:02:27 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2015-08-09 17:02:27 +0100 |
commit | ecece2cfb5c75c8e4c77d8529a6ef2214445752b (patch) | |
tree | 291395dcfe184c52a11d9d3ef1c144fbfe94bc9f /buildconf.bat | |
parent | 4d13b78aec495e7448680fee62af59c446b48309 (diff) | |
download | curl-ecece2cfb5c75c8e4c77d8529a6ef2214445752b.tar.gz |
buildconf.bat: Move DOS variable clean-up code to separate function
Rather than duplicate future variables, during clean-up of both success
and error conditions, use a common function that can be called by both.
Diffstat (limited to 'buildconf.bat')
-rw-r--r-- | buildconf.bat | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/buildconf.bat b/buildconf.bat index 38e6db3aa..09c4db60c 100644 --- a/buildconf.bat +++ b/buildconf.bat @@ -79,6 +79,7 @@ rem snapshot archives. goto success rem Main generate function. +rem rem Returns: rem rem 0 - success @@ -86,7 +87,6 @@ rem 1 - failure to generate Makefile rem 2 - failure to generate tool_hugehelp.c rem 3 - failure to generate curlbuild.h rem -rem :generate rem create Makefile if exist Makefile.dist ( @@ -162,6 +162,14 @@ rem exit /B 0 +rem Function to clean-up local variables under DOS, Windows 3.x and +rem Windows 9x as setlocal isn't available until Windows NT +rem +:dosCleanup + set MODE= + + exit /B + :syntax rem Display the help echo. @@ -214,7 +222,7 @@ rem if "%OS%" == "Windows_NT" ( endlocal ) else ( - set MODE= + call :dosCleanup ) exit /B 1 @@ -222,6 +230,6 @@ rem if "%OS%" == "Windows_NT" ( endlocal ) else ( - set MODE= + call :dosCleanup ) exit /B 0 |