Skip to content
Snippets Groups Projects
Commit dcf5817d authored by Lukasz Butkowski's avatar Lukasz Butkowski
Browse files

fix: FWK_HW_FILE glob chars: pick one latest version

parent 65e14ead
Branches
Tags 0.9.2
No related merge requests found
......@@ -348,12 +348,18 @@ proc ::fwfwk::loadProjectInfo {cfgFile} {
set ::fwfwk::PlatformName ${::fwfwk::ProjectName}_platform
if { [info exists ::env(FWK_HW_FILE)] } {
if { [file exists [glob -nocomplain $::env(FWK_HW_FILE)]]} { # absolute path
set ::fwfwk::HwFile [glob -nocomplain $::env(FWK_HW_FILE)]
} elseif { [file exists [glob -nocomplain $executionFolder/$::env(FWK_HW_FILE)]] } {
set ::fwfwk::HwFile [glob -nocomplain $executionFolder/$::env(FWK_HW_FILE)]
} else {
set ::fwfwk::HwFile $::env(FWK_HW_FILE)
set hwFilePath [lindex [lsort -dictionary [glob -nocomplain $::env(FWK_HW_FILE)]] end]
if { [file exists $hwFilePath] } { # absolute path
set ::fwfwk::HwFile $hwFilePath
}
set hwFilePath [lindex [lsort -dictionary [glob -nocomplain $executionFolder/$::env(FWK_HW_FILE)]] end]
if { [file exists $hwFilePath] } { # relative path
set ::fwfwk::HwFile $hwFilePath
}
if { ![info exists ::fwfwk::HwFile] } {
set ::fwfwk::HwFile ""; #$::env(FWK_HW_FILE)
::fwfwk::printWarning "Cannot find HW File: $::env(FWK_HW_FILE)"
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment