Skip to content

Commit

Permalink
add metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Jun 27, 2024
1 parent 5d78779 commit 81ffb95
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/tasks/manifest_lookup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ manifest_parse() {
#echo "S:"
newline=$'\n'
section=MUSH_USTABLE
while IFS= read line || [[ -n "${line}" ]]; do
while IFS= read -r line || [[ -n "${line}" ]]; do
line="${line#"${line%%[![:space:]]*}"}"
line="${line%"${line##*[![:space:]]}"}"
line_number=$((line_number + 1))
Expand Down Expand Up @@ -69,6 +69,10 @@ manifest_parse() {
"[features]")
section=MUSH_FEATURE
;;
"[[bin]]")
section=MUSH_BINARIES
MUSH_BINARIES="${MUSH_BINARIES}${newline}"
;;
[a-z]*)
case $section in
MUSH_PACKAGE)
Expand Down Expand Up @@ -112,6 +116,12 @@ manifest_parse() {
MUSH_FEATURES="${MUSH_FEATURES}${feature}=${value}${newline}"
#eval "${section}_${field}=\$value"
;;
MUSH_BINARIES)
field=$(echo "$line" | cut -d'=' -f1 | xargs | tr '-' '_')
value=$(echo "$line" | cut -d'=' -f2 | xargs)
MUSH_FEATURES="${MUSH_FEATURES}${field}=${value},"
#eval "${section}_${field}=\$value"
;;
*)
;;
esac
Expand Down
4 changes: 4 additions & 0 deletions tests/fixtures/rust-app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ edition = "2021"
name = "mush-test"
path = "src/main.rs"

[[bin]]
name = "mush-test-2"
path = "src/main2.rs"

#[build-dependencies]
#build-target = "0.4.0"
#bindgen = "0.60.1"
Expand Down
46 changes: 46 additions & 0 deletions tests/fixtures/rust-app/src/main2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

//mod not_exists;
















//mod mod1;
//mod notfound;

//mod mod2;

//extern crate cavallo;


//use package::mod1::hello;

//use mod1::hello;

fn main() {
println!("Hello World! 222");

//json::parse("{}").unwrap();
//hello();
}

/*
if 6 < 7 {
println!("Hello World!");
}
if 6 < 7 {
println!("Hello World!");
}
*/

0 comments on commit 81ffb95

Please sign in to comment.