Support tree; Do not enforce LBA source for Overlays
This commit is contained in:
parent
0e16ae4a45
commit
da6e8e467b
|
@ -83,7 +83,7 @@
|
||||||
{
|
{
|
||||||
"id": "cargo cmd",
|
"id": "cargo cmd",
|
||||||
"type":"pickString",
|
"type":"pickString",
|
||||||
"options": ["build", "check", "update", "clean", "run"],
|
"options": ["build", "check", "update", "clean", "run", "tree"],
|
||||||
"default": "build",
|
"default": "build",
|
||||||
"description": "cargo command to run"
|
"description": "cargo command to run"
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,9 +8,9 @@ panic = "abort"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cdtypes = {path = "../cdtypes"}
|
cdtypes = {path = "../cdtypes"}
|
||||||
clap = {version = "*", features = ["derive"]}
|
clap = {version = "4.4.11", features = ["derive"]}
|
||||||
colored = "*"
|
colored = "2.1.0"
|
||||||
no-comment = "*"
|
no-comment = "0.0.3"
|
||||||
paste = "*"
|
paste = "1.0.14"
|
||||||
roxmltree = "*"
|
roxmltree = "0.19.0"
|
||||||
tool_helper = {path = "../tool_helper"}
|
tool_helper = {path = "../tool_helper"}
|
||||||
|
|
|
@ -120,7 +120,13 @@ fn load_lba_names(lba_source: PathBuf) -> Result<LBANameVec, Error> {
|
||||||
Ok(file[start..end].to_owned())
|
Ok(file[start..end].to_owned())
|
||||||
}
|
}
|
||||||
|
|
||||||
let file = read_file_to_string(&lba_source)?.chars().without_comments(languages::c()).collect::<String>();
|
let file_content = {
|
||||||
|
match read_file_to_string(&lba_source) {
|
||||||
|
Ok(data) => data,
|
||||||
|
Err(_) => return Ok(LBANameVec::new())
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let file = file_content.chars().without_comments(languages::c()).collect::<String>();
|
||||||
let file = get_part_of_interest(file, &lba_source)?;
|
let file = get_part_of_interest(file, &lba_source)?;
|
||||||
let mut lba_names = Vec::new();
|
let mut lba_names = Vec::new();
|
||||||
|
|
||||||
|
|
|
@ -55,4 +55,10 @@ IF %2 == update (
|
||||||
exit /B %ERRORLEVEL%
|
exit /B %ERRORLEVEL%
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF %2 == tree (
|
||||||
|
%wsl%cargo tree
|
||||||
|
|
||||||
|
exit /B %ERRORLEVEL%
|
||||||
|
)
|
||||||
|
|
||||||
echo "Unkown cargo command "%2" for project "%1"
|
echo "Unkown cargo command "%2" for project "%1"
|
|
@ -37,6 +37,10 @@ elif [ $2 = update ]; then
|
||||||
echo "cargo update $1"
|
echo "cargo update $1"
|
||||||
$HOME/.cargo/bin/cargo update
|
$HOME/.cargo/bin/cargo update
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
elif [ $2 = tree ]; then
|
||||||
|
$HOME/.cargo/bin/cargo tree
|
||||||
|
|
||||||
exit $?
|
exit $?
|
||||||
else
|
else
|
||||||
echo "Unkown cargo command $2 for project $1"
|
echo "Unkown cargo command $2 for project $1"
|
||||||
|
|
Loading…
Reference in New Issue