From 7aed85f519bada49595232bd4408ab9ae006d4e1 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 26 Apr 2017 22:02:45 +0300 Subject: consistent indentation in *.bat files --- build_driver.bat | 57 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'build_driver.bat') diff --git a/build_driver.bat b/build_driver.bat index 2020dd9..283cde8 100644 --- a/build_driver.bat +++ b/build_driver.bat @@ -7,8 +7,8 @@ @echo off if [%1] == [] ( - echo Usage: %~0 DRIVER_SRC_ROOT - exit /b 1 + echo Usage: %~0 DRIVER_SRC_ROOT + exit /b 1 ) call check_env.bat || exit /b !errorlevel! @@ -17,8 +17,8 @@ call check_ddk.bat || exit /b !errorlevel! set driver_src_root=%~f1 for /f %%i in ("%driver_src_root%") do ( - set driver_name=%%~ni - set driver_dist_subdir=%%~dpi + set driver_name=%%~ni + set driver_dist_subdir=%%~dpi ) call :make_relative driver_dist_subdir "%src_root%" @@ -35,20 +35,20 @@ echo. echo ============================== BUILD ============================== set LIBDISTDIR=%lib_dist_dir% pushd "%driver_src_root%" && ( - build.exe /cegwZ - popd + build.exe /cegwZ + popd ) if %errorlevel% equ 0 ( - echo ========================== BUILD SUCCESS ========================== + echo ========================== BUILD SUCCESS ========================== ) else ( - echo ========================== BUILD FAILURE ========================== - exit /b %errorlevel% + echo ========================== BUILD FAILURE ========================== + exit /b %errorlevel% ) if [%_BUILDARCH%] == [x86] ( - set buildarch_directory=i386 + set buildarch_directory=i386 ) else ( - set buildarch_directory=%_BUILDARCH% + set buildarch_directory=%_BUILDARCH% ) set sys_path=%driver_src_root%\obj%BUILD_ALT_DIR%\%buildarch_directory%\%driver_name%.sys @@ -56,34 +56,35 @@ set pdb_path=%driver_src_root%\obj%BUILD_ALT_DIR%\%buildarch_directory%\%driver_ set lib_path=%driver_src_root%\obj%BUILD_ALT_DIR%\%buildarch_directory%\%driver_name%.lib if exist "%sys_path%" ( - echo. - call "%root%\sign.bat" "%sys_path%" || exit /b !errorlevel! + echo. + call "%root%\sign.bat" "%sys_path%" || exit /b !errorlevel! ) echo. echo ============================== DISTR ============================== if exist "%sys_path%" ( - call :distr_copy "%sys_path%" "%sys_dist_dir%" || goto :distr_failure - call :distr_copy "%pdb_path%" "%pdb_dist_dir%" || goto :distr_failure + call :distr_copy "%sys_path%" "%sys_dist_dir%" || goto :distr_failure + call :distr_copy "%pdb_path%" "%pdb_dist_dir%" || goto :distr_failure ) if exist "%lib_path%" ( - call :distr_copy "%lib_path%" "%lib_dist_dir%" || goto :distr_failure + call :distr_copy "%lib_path%" "%lib_dist_dir%" || goto :distr_failure ) echo ========================== DISTR SUCCESS ========================== exit /b :distr_mkdir if not exist "%~1\" ( - echo mkdir "%~1" - mkdir "%~1" >nul || exit /b !errorlevel! + echo mkdir "%~1" + mkdir "%~1" >nul + exit /b !errorlevel! ) -exit /b +exit /b 0 :distr_copy call :distr_mkdir "%~2" || exit /b !errorlevel! echo copy "%~1" "%~2" -copy "%~1" "%~2" >nul || exit /b !errorlevel! -exit /b + copy "%~1" "%~2" >nul +exit /b !errorlevel! :distr_failure echo ========================== DISTR FAILURE ========================== @@ -100,13 +101,13 @@ for /f "tokens=*" %%a in ("%base%") do set base=%%~fa set match= set c= for /f "tokens=*" %%a in ('echo.%base:\=^&echo.%') do ( - set sub=!sub!%%a\ - call set tmp=%%src:!sub!=%% - if "!tmp!" neq "!src!" ( - set match=!sub! - ) else ( - set upper=!upper!..\ - ) + set sub=!sub!%%a\ + call set tmp=%%src:!sub!=%% + if "!tmp!" neq "!src!" ( + set match=!sub! + ) else ( + set upper=!upper!..\ + ) ) set src=%upper%!src:%match%=! (endlocal -- cgit v1.2.3