Codebase list rust-libslirp / 6310ab10-2c91-4cc6-b8e4-8a33042f3195/main dev / filter-crate-in-debian.sh
6310ab10-2c91-4cc6-b8e4-8a33042f3195/main

Tree @6310ab10-2c91-4cc6-b8e4-8a33042f3195/main (Download .tar.gz)

filter-crate-in-debian.sh @6310ab10-2c91-4cc6-b8e4-8a33042f3195/mainraw · history · blame

#!/bin/bash
# Filter list of crates by whether they're packaged in Debian.
# You need to have an up-to-date APT cache for Debian unstable.
set -e

while read crate ver; do
	pkg="${crate//_/-}"
	numpkg="$(apt-cache showpkg "librust-$pkg-${ver:+${ver}-}dev" 2>/dev/null | grep "^Package: $fullpkg" | wc -l)"
	echo "$crate $ver $numpkg"
done