aboutsummaryrefslogtreecommitdiff
path: root/publish.sh
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-06-01 14:55:50 +0200
committerCrozet Sébastien <developer@crozet.re>2021-06-01 14:55:50 +0200
commit5ef81cda406d796c5d188542b5bd9fbf4aefd4cf (patch)
tree283ac6079bd1b51396bfc228addb23e5c38c07cb /publish.sh
parent826ce5f014281fd04b7a18238f102f2591d0b255 (diff)
downloadrapier-5ef81cda406d796c5d188542b5bd9fbf4aefd4cf.tar.gz
rapier-5ef81cda406d796c5d188542b5bd9fbf4aefd4cf.tar.bz2
rapier-5ef81cda406d796c5d188542b5bd9fbf4aefd4cf.zip
Add velocity-based kinematic bodies
Diffstat (limited to 'publish.sh')
-rwxr-xr-xpublish.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 0000000..9431d3e
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,35 @@
+#! /bin/bash
+
+tmp=$(mktemp -d)
+
+echo "$tmp"
+
+cp -r src "$tmp"/.
+cp -r LICENSE README.md "$tmp"/.
+
+### Publish the 2D version.
+sed 's#\.\./\.\./src#src#g' build/rapier2d/Cargo.toml > "$tmp"/Cargo.toml
+currdir=$(pwd)
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+
+### Publish the 3D version.
+sed 's#\.\./\.\./src#src#g' build/rapier3d/Cargo.toml > "$tmp"/Cargo.toml
+cp -r LICENSE README.md "$tmp"/.
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+### Publish the 2D f64 version.
+sed 's#\.\./\.\./src#src#g' build/rapier2d-f64/Cargo.toml > "$tmp"/Cargo.toml
+currdir=$(pwd)
+cd "$tmp" && cargo publish
+cd "$currdir" || exit
+
+
+### Publish the 3D f64 version.
+sed 's#\.\./\.\./src#src#g' build/rapier3d-f64/Cargo.toml > "$tmp"/Cargo.toml
+cp -r LICENSE README.md "$tmp"/.
+cd "$tmp" && cargo publish
+
+rm -rf "$tmp"