Add script to publish the testbed.
This commit is contained in:
26
publish-testbeds.sh
Executable file
26
publish-testbeds.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#! /bin/bash
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
|
||||
echo "$tmp"
|
||||
|
||||
cp -r src "$tmp"/.
|
||||
cp -r src_testbed "$tmp"/.
|
||||
cp -r build "$tmp"/.
|
||||
cp -r LICENSE README.md "$tmp"/.
|
||||
|
||||
### Publish the 2D version.
|
||||
sed 's#\.\./\.\./src#src#g' build/rapier_testbed2d/Cargo.toml > "$tmp"/Cargo.toml
|
||||
sed -i 's#\.\./rapier#./build/rapier#g' "$tmp"/Cargo.toml
|
||||
currdir=$(pwd)
|
||||
cd "$tmp" && cargo publish
|
||||
cd "$currdir" || exit
|
||||
|
||||
|
||||
### Publish the 3D version.
|
||||
sed 's#\.\./\.\./src#src#g' build/rapier_testbed3d/Cargo.toml > "$tmp"/Cargo.toml
|
||||
sed -i 's#\.\./rapier#./build/rapier#g' "$tmp"/Cargo.toml
|
||||
cp -r LICENSE README.md "$tmp"/.
|
||||
cd "$tmp" && cargo publish
|
||||
|
||||
rm -rf "$tmp"
|
||||
Reference in New Issue
Block a user