diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-12-28 17:25:24 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-12-28 17:25:24 +0000 |
commit | 8d86e3673af54d97b8369fdffba2200268ad3fac (patch) | |
tree | 06cf318eabef69c26360b11005bc19ad8bce72c1 | |
parent | f3e7c76f81125928f3c57c4aaf30807d9d20841b (diff) |
lpgen/refresher.bat: Add some error handling
git-svn-id: http://svn.miranda-ng.org/main/trunk@11664 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | langpacks/czech/Refresh.bat | 3 | ||||
-rw-r--r-- | tools/lpgen/refresher.bat | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/langpacks/czech/Refresh.bat b/langpacks/czech/Refresh.bat index 9ed2081071..17f7be5b83 100644 --- a/langpacks/czech/Refresh.bat +++ b/langpacks/czech/Refresh.bat @@ -11,5 +11,8 @@ REM ========================= cd "..\..\tools\lpgen\"
call refresher.bat %language% "%oldLangpackPath%"
+REM if previous command failed, exit
+if %ERRORLEVEL% NEQ 0 exit /B 1
+
REM copy and reload langpack in your Miranda (uncoment next line + enable cmdline.dll plugin to use it)
call installer.bat %language% "%mirandaPath%"
diff --git a/tools/lpgen/refresher.bat b/tools/lpgen/refresher.bat index efc6c156d0..062e01e185 100644 --- a/tools/lpgen/refresher.bat +++ b/tools/lpgen/refresher.bat @@ -53,7 +53,7 @@ if "%err%"=="1" ( echo.
pause
- goto end
+ exit /B 1
)
REM =========================
@@ -82,6 +82,13 @@ if "%phase%" == "0" ( cscript /nologo translate.js /out:".\" /untranslated:"Untranslated" /release:"Langpack_%language%.txt" /sourcelang:"%language%"
)
+REM if previous command failed, exit
+if %ERRORLEVEL% NEQ 0 (
+ echo ERROR: Refreshing failed!
+ pause
+ exit /B 1
+)
+
rmdir /S /Q "..\..\langpacks\%language%\Weather"
rmdir /S /Q "..\..\langpacks\%language%\Plugins"
rmdir /S /Q "..\..\langpacks\%language%\Untranslated"
|