Make sed cross-platform
This commit is contained in:
parent
88b593b352
commit
4a7f57e792
|
@ -39,7 +39,8 @@ if [ -f Cargo.toml.orig ]; then
|
|||
echo 'Not altering Java Cargo.toml file'
|
||||
else
|
||||
cp Cargo.toml Cargo.toml.orig
|
||||
sed -i 's%^hyperbuild = .*$%hyperbuild = { path = ".." }%' Cargo.toml
|
||||
# Don't use -i as macOS requires '' argument but then Ubuntu will treat as pattern.
|
||||
sed 's%^hyperbuild = .*$%hyperbuild = { path = ".." }%' Cargo.toml.orig > Cargo.toml
|
||||
fi
|
||||
cargo build $rust_build_arg
|
||||
mv Cargo.toml.orig Cargo.toml
|
||||
|
|
|
@ -16,7 +16,8 @@ if [ -f native/Cargo.toml.orig ]; then
|
|||
echo 'Not altering Node.js Cargo.toml file'
|
||||
else
|
||||
cp native/Cargo.toml native/Cargo.toml.orig
|
||||
sed -i '' 's%^hyperbuild = .*$%hyperbuild = { path = "../.." }%' native/Cargo.toml
|
||||
# Don't use -i as macOS requires '' argument but then Ubuntu will treat as pattern.
|
||||
sed 's%^hyperbuild = .*$%hyperbuild = { path = "../.." }%' native/Cargo.toml.orig > native/Cargo.toml
|
||||
fi
|
||||
npx neon build --release
|
||||
mv native/Cargo.toml.orig native/Cargo.toml
|
||||
|
|
Loading…
Reference in New Issue