Skip to content

Commit

Permalink
scripts: add a script to patch cargo.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Muminul Islam <[email protected]>
  • Loading branch information
russell-islam committed Apr 26, 2024
1 parent 4aaf7d9 commit 941ae1c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/use-local-mshv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/sh

line=$(grep -n '\[dev-dependencies\]' Cargo.toml | tail -n1 | cut -f1 -d:)

sed -i "$line i [patch.\"https://github.com/rust-vmm/mshv\"]\n" ./Cargo.toml
line=$((line+1))
sed -i "$line i mshv-bindings = { path = \"../mshv/mshv-bindings\" }" ./Cargo.toml

line=$((line+1))
sed -i "$line i mshv-ioctls = { path = \"../mshv/mshv-ioctls\" }" ./Cargo.toml


0 comments on commit 941ae1c

Please sign in to comment.