Skip to content

Commit bb2125a

Browse files
authored
Add a script to manage the ownership of the Linera crates (#3803)
## Motivation Verify and modify the ownership of our crates in bulk ## Proposal We create `scripts/owner.sh` * This script works like the other package-related scripts but runs `cargo owner` * Because this command is potentially risky, we ask for the user to type "yes" ## Test Plan ``` scripts/owner.sh packages.txt --list ```
1 parent aa99982 commit bb2125a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Diff for: scripts/owner.sh

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# Run cargo owner on the current workspace.
4+
#
5+
# Usage: scripts/owner.sh packages.txt ARGS..
6+
7+
set -e
8+
9+
PACKAGES="$1"
10+
shift
11+
12+
echo "Type 'yes' to run the following command on every crate: cargo owner $@"
13+
read INPUT
14+
if [ "$INPUT" != "yes" ]; then exit 0; fi
15+
16+
grep -v '^#' "$PACKAGES" | while read LINE; do
17+
LINE=($LINE)
18+
NAME="${LINE[0]}"
19+
(
20+
set -x;
21+
cargo owner "$@" "$NAME"
22+
)
23+
done

0 commit comments

Comments
 (0)