From 3a0a02d96cea0bea66db7b635ce7e15b49465b67 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Sat, 18 Feb 2017 06:43:50 +0300 Subject: bat update --- makehmod.bat | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'makehmod.bat') diff --git a/makehmod.bat b/makehmod.bat index cbd2ad6..b90eab8 100644 --- a/makehmod.bat +++ b/makehmod.bat @@ -6,14 +6,15 @@ for %%x in (%*) do set outdir=%1 cd %moddir% if not ERRORLEVEL 0 goto error -tar -czvf %modname% * +if EXIST "%modname%" del /F /Q "%modname%" +tar -czvf "%modname%" * if ERRORLEVEL 9009 goto notar -if not ERRORLEVEL 0 goto error -md ..\%outdir% -if not ERRORLEVEL 0 goto error -del /F /S /Q ..\%outdir% -if not ERRORLEVEL 0 goto error -move /Y %modname% ..\%outdir% +if NOT ERRORLEVEL 0 goto error +if NOT EXIST "..\%outdir%" md "..\%outdir%" +if NOT ERRORLEVEL 0 goto error +if EXIST "..\%outdir%\%modname%" del /F /Q "..\%outdir%\%modname%" +if NOT ERRORLEVEL 0 goto error +move /Y "%modname%" "..\%outdir%" if not ERRORLEVEL 0 goto error echo Done! goto end -- cgit v1.2.3