#!/usr/bin/env bash
set -euo pipefail

# Patch all pinned sciforge versions to "*" (always latest)

find . -name "Cargo.toml" -not -path "*/target/*" | while read -r file; do
    if grep -q 'sciforge' "$file"; then
        sed -i 's/sciforge = "[^"]*"/sciforge = "*"/' "$file"
        echo "Patched $file"
    fi
done
