changed robocopy return code

This commit is contained in:
dzaitsev
2025-05-07 16:18:38 +03:00
parent 52c724eac6
commit 22f047bbe5
+11 -10
View File
@@ -1,21 +1,22 @@
echo Make dirs, copy init dlls
pushd %~dp0..
REM Save the current directory
set CURRENT_DIR=%cd%
REM Change to the parent directory of the current location
cd /d %~dp0..
REM Remove and recreate the dist-dlls and dist-azaion directories
if exist dist-dlls rmdir dist-dlls /s /q
mkdir dist-dlls
if exist dist-azaion rmdir dist-azaion /s /q
mkdir dist-azaion
echo Copying shared libs
REM Copy the shared libs from the source location to dist-dlls
robocopy "C:\\share" "dist-dlls" "*"
set RC=%ERRORLEVEL%
if %RC% GEQ 8 (
echo Robocopy failed with code %RC%.
popd
exit /b %RC%
)
REM Return to the original directory
cd /d %CURRENT_DIR%
echo Robocopy succeeded with code %RC%.
popd
exit /b 0
echo Init script completed.