-
-
Notifications
You must be signed in to change notification settings - Fork 283
Expand file tree
/
Copy pathpublish.sh
More file actions
27 lines (20 loc) · 642 Bytes
/
Copy pathpublish.sh
File metadata and controls
27 lines (20 loc) · 642 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/bash
tmp=$(mktemp -d)
echo "$tmp"
currdir=$(pwd)
cp -r src "$tmp"/.
cp -r LICENSE-MIT LICENSE-APACHE README.md "$tmp"/.
### Publish avian2d
sed 's#\.\./\.\./src#src#g' crates/avian2d/Cargo.toml > "$tmp"/Cargo.toml
cp -r crates/avian2d/examples "$tmp"/.
cp -r crates/avian2d/benches "$tmp"/.
cd "$tmp" && cargo publish
### Remove the 2D examples and return to previous directory
rm -rf examples
cd "$currdir" || exit
### Publish avian3d
sed 's#\.\./\.\./src#src#g' crates/avian3d/Cargo.toml > "$tmp"/Cargo.toml
cp -r crates/avian3d/examples "$tmp"/.
cp -r crates/avian3d/benches "$tmp"/.
cd "$tmp" && cargo publish
rm -rf "$tmp"