diff --git a/build/init.cmd b/build/init.cmd index 11e98a4..56e0250 100644 --- a/build/init.cmd +++ b/build/init.cmd @@ -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 \ No newline at end of file +echo Init script completed.