Change variable expansion in build scripts

Currently the variable expansion sometimes doesn't work when done over
two variables. Inlining the ~dp0 call along with \..\..\ seems to work.

Testing leads me to believe that the Windows command prompt caches
things in a weird way.
This commit is contained in:
Vasily
2018-12-26 21:58:03 +01:00
parent 759bd859bb
commit 2aa32bafad
3 changed files with 3 additions and 6 deletions
+1 -2
View File
@@ -19,9 +19,8 @@ IF NOT DEFINED project_dir (
REM Arg 0 (called %0) is the full path to the file.
REM https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/call#batch-parameters
REM As per above link, %~dp0 expands the zeroth arg to a drive letter and path only.
SET folder_path=%~dp0
REM Project dir is up two dirs from the file.
SET project_dir=%folder_path%\..\..\
SET project_dir=%~dp0\..\..\
)
ECHO %current_activity%: Testing if all required build environment values are set: