Skip to content

Commit 8625aab

Browse files
committed
Check CWD in builds-deps.cmd IfcOpenShell#804
1 parent 7e6ebbe commit 8625aab

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

win/build-deps.cmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
@echo off
2525
echo.
2626

27+
for %%Q in ("%~dp0\.") DO set "batpath=%%~fQ"
28+
29+
if NOT "%CD%" == "%batpath%" (
30+
GOTO :ErrorAndPrintUsage
31+
)
32+
33+
2734
set PROJECT_NAME=IfcOpenShell
2835
call utils\cecho.cmd 15 0 "This script fetches and builds all %PROJECT_NAME% dependencies"
2936
echo.
@@ -562,3 +569,5 @@ echo - https://www.visualstudio.com/
562569
echo 5. Run this batch script with Visual Studio environment variables set.
563570
echo - https://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx
564571
echo.
572+
echo NB: This script needs to be ran from the directory directly containing it.
573+
echo.

0 commit comments

Comments
 (0)