Codebase list rust-stfu8 / 4c128e93-5432-4178-b3c8-3e176ad32f81/main dev / filter-crate-in-debian.sh
4c128e93-5432-4178-b3c8-3e176ad32f81/main

Tree @4c128e93-5432-4178-b3c8-3e176ad32f81/main (Download .tar.gz)

filter-crate-in-debian.sh @4c128e93-5432-4178-b3c8-3e176ad32f81/main

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