#!/bin/bash
# Update dependencies for each Cargo manifest in the tree.
find . -type d \( -name target -o -name .git \) -prune -o \
  -type f -name Cargo.toml \
  -exec sh -c '
    status=0
    for manifest do
      cargo update --manifest-path "$manifest" || status=1
    done
    exit "$status"
  ' sh {} +
