changeset 38:e068c5039756

Handle files and project roots with spaces in them on Windows.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 08 Jan 2015 16:54:20 -0800
parents 0c67b56abc63
children 448c128e2952
files plat/win32/update_tags.cmd
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/plat/win32/update_tags.cmd	Mon Dec 15 13:00:04 2014 -0800
+++ b/plat/win32/update_tags.cmd	Thu Jan 08 16:54:20 2015 -0800
@@ -74,17 +74,17 @@
 echo locked > "%TAGS_FILE%.lock"
 
 if exist "%TAGS_FILE%" (
-    if not [%UPDATED_SOURCE%]==[] (
+    if not ["%UPDATED_SOURCE%"]==[""] (
         echo Removing references to: %UPDATED_SOURCE% >> %LOG_FILE%
         echo type "%TAGS_FILE%" ^| findstr /V /C:"%UPDATED_SOURCE%" ^> "%TAGS_FILE%.temp" >> %LOG_FILE%
         findstr /V /C:"%UPDATED_SOURCE%" "%TAGS_FILE%" > "%TAGS_FILE%.temp"
-        set CTAGS_ARGS=%CTAGS_ARGS% --append %UPDATED_SOURCE%
+        set CTAGS_ARGS=%CTAGS_ARGS% --append "%UPDATED_SOURCE%"
     )
 )
 
 echo Running ctags >> %LOG_FILE%
-echo call "%CTAGS_EXE%" -R -f "%TAGS_FILE%.temp" %CTAGS_ARGS% %PROJECT_ROOT% >> %LOG_FILE%
-call "%CTAGS_EXE%" -R -f "%TAGS_FILE%.temp" %CTAGS_ARGS% %PROJECT_ROOT% >> %LOG_FILE% 2>&1
+echo call "%CTAGS_EXE%" -R -f "%TAGS_FILE%.temp" %CTAGS_ARGS% "%PROJECT_ROOT%" >> %LOG_FILE%
+call "%CTAGS_EXE%" -R -f "%TAGS_FILE%.temp" %CTAGS_ARGS% "%PROJECT_ROOT%" >> %LOG_FILE% 2>&1
 if ERRORLEVEL 1 (
     echo ERROR: Ctags executable returned non-zero code. >> %LOG_FILE%
     goto :Unlock