diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-02-18 06:43:50 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-02-18 06:43:50 +0300 |
commit | 3a0a02d96cea0bea66db7b635ce7e15b49465b67 (patch) | |
tree | 0602c6aa24b4ed922165e6e2bd82f873c1e5f92c /makehmod.bat | |
parent | 83497f3ddb681733956ab8038170121c572ba903 (diff) |
bat update
Diffstat (limited to 'makehmod.bat')
-rw-r--r-- | makehmod.bat | 15 |
1 files changed, 8 insertions, 7 deletions
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
|