#!/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