OXYGENHUB
# 01320eefd505 spectra / scripts / deps-pin.sh
931 B · Bourne Again Shell (bash) · executable · last changed spectra serve and Tuner: MCP over the Unix socket and loopback, signed requests, both protocol revisions, owner events through the daemon (#7) 2 days ago source blame history raw
1
#!/bin/sh
2
# Move every crate in Cargo.lock that the OxygenFlow image does not vendor to
3
# the newest version of it that the image does (spectra#2), then report what
4
# `scripts/deps-check.sh` still finds. Run after adding a dependency.
5
set -eu
6
cd "$(dirname "$0")/.."
7
dev=${DEV:-..}
8
pkgs() { awk '/^\[\[package\]\]/{n="";v=""} /^name = /{n=$3} /^version = /{v=$3} /^source = /{print n" "v}' "$@" | tr -d '"' | sort -u; }
9
have=$(pkgs "$dev/oxygen/Cargo.lock" "$dev/oxygenhub/Cargo.lock" "$dev/oxygenflow/Cargo.lock")
10
for round in 1 2 3 4 5; do
11
    missing=$(pkgs Cargo.lock | grep -vxF "$have" || true)
12
    [ -z "$missing" ] && break
13
    printf '%s\n' "$missing" | while read -r name version; do
14
        target=$(printf '%s\n' "$have" | awk -v n="$name" '$1==n{print $2}' | sort -V | tail -1)
15
        [ -n "$target" ] && cargo update -q -p "$name@$version" --precise "$target" 2>/dev/null || true
16
    done
17
done
18
scripts/deps-check.sh