summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Mao <[email protected]>2017-10-02 17:20:36 -0700
committerWei Mao <[email protected]>2017-10-02 17:20:36 -0700
commitb649103ec29820e7411d7fd80e13430007d726e5 (patch)
tree766565451891059d0d11f675715fe73d1f834c3b
parent5a706e661e678e33bac158c1f330836d7d2d6202 (diff)
Allow space in folder name
-rw-r--r--build-dir.cmd14
1 files changed, 10 insertions, 4 deletions
diff --git a/build-dir.cmd b/build-dir.cmd
index 22026b2c..56874f1c 100644
--- a/build-dir.cmd
+++ b/build-dir.cmd
@@ -11,15 +11,21 @@ rem $1 - sub-folder name
rem $2 - full path to the sub-folder
rem
:check_folder
-pushd %1
+set name=%1
+set fullpath=%2
+set name=%name:"=%
+set fullpath=%fullpath:"=%
+pushd "%name%"
if exist *.sln (
- echo %2
- echo === %2 >> %logfile%
+ echo %fullpath%
+ echo === %fullpath% >> %logfile%
for /f %%i in ('dir /b *.sln') do (
msbuild /nologo /v:q /m /t:rebuild %%i >> %logfile%
)
) else (
- for /f %%i in ('dir /b /ad') do call :check_folder %%i %2/%%i
+ for /d %%i in (*) do (
+ call :check_folder "%%i" "%fullpath%/%%i"
+ )
)
popd