blob: bd48c49ec6fcebf233e669cdf63ce43feb73e120 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
if ! which cargo >/dev/null 2>&1; then
echo "Error: cargo not found." >&2
exit 1
fi
for pkg in $(cargo install --list | grep '^[^[:space:]]' | awk '{print $1}'); do
printf '\nUpdating %s\n' "$pkg"
locked=
if [ "$pkg" = "bacon" -o \
"$pkg" = "cargo-vet" ]; then
locked="--locked"
fi
cargo install $locked "$@" "$pkg" || exit 1
done
exit 0
|