refactor: set reference directory to current working directory
This commit is contained in:
@@ -437,10 +437,10 @@ _info "Working at $ws"
|
|||||||
set config_file_id [open $config_file r]
|
set config_file_id [open $config_file r]
|
||||||
set config_data [read $config_file_id]
|
set config_data [read $config_file_id]
|
||||||
close $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 config [json::json2dict $config_data]
|
||||||
set project_name [dict get $config project_name]
|
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 "Starting process: $function"
|
||||||
_info "Project name: $project_name"
|
_info "Project name: $project_name"
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ set "work_dir=%~dp0build"
|
|||||||
set "config=%~dp0config.json"
|
set "config=%~dp0config.json"
|
||||||
set "tools_dir=%~dp0scripts\platform\%platform%"
|
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
|
REM Set up enviroment
|
||||||
call "%tools_dir%\setenv.bat" "%pltform_ver%"
|
call "%tools_dir%\setenv.bat" "%pltform_ver%"
|
||||||
if "%ERRORLEVEL%" neq "0" (
|
if "%ERRORLEVEL%" neq "0" (
|
||||||
|
|||||||
Reference in New Issue
Block a user