refactor: set reference directory to current working directory

This commit is contained in:
Gatsby Van
2024-11-04 20:21:32 +08:00
parent 3dabd24964
commit e8a1e869cb
2 changed files with 5 additions and 2 deletions
+2 -2
View File
@@ -437,10 +437,10 @@ _info "Working at $ws"
set config_file_id [open $config_file r]
set config_data [read $config_file_id]
close $config_file_id
set root [file dirname [file normalize $config_file]]
set root [pwd]
set config [json::json2dict $config_data]
set project_name [dict get $config project_name]
set hw_file [file normalize [file join [file dirname $config_file] [dict get $config hw_design]]]
set hw_file [file normalize [file join $::root [dict get $config hw_design]]]
_info "Starting process: $function"
_info "Project name: $project_name"
+3
View File
@@ -5,6 +5,9 @@ set "work_dir=%~dp0build"
set "config=%~dp0config.json"
set "tools_dir=%~dp0scripts\platform\%platform%"
REM Change working dir to the dir where this script is located
cd /d "%~dp0"
REM Set up enviroment
call "%tools_dir%\setenv.bat" "%pltform_ver%"
if "%ERRORLEVEL%" neq "0" (