Codebase list rust-stfu8 / e8aca34
Make filter-in-debian more precise, split into 2 scripts Ximin Luo 3 years ago
7 changed file(s) with 25 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/bash
1 # Filter list of crates by whether they're packaged in Debian.
2 # You need to have an up-to-date APT cache for Debian unstable.
3 set -e
4
5 while read crate ver; do
6 pkg="${crate//_/-}"
7 numpkg="$(apt-cache showpkg "librust-$pkg-${ver:+${ver}-}dev" 2>/dev/null | grep "^Package: $fullpkg" | wc -l)"
8 echo "$crate $ver $numpkg"
9 done
+0
-11
dev/filter-in-debian.sh less more
0 #!/bin/bash
1 # Filter list of crates by whether they're not in Debian.
2 # You need to have an up-to-date APT cache for Debian unstable.
3 set -e
4
5 while read crate ver; do
6 pkg="${crate//_/-}"
7 fullpkg=rust-"${pkg}${ver:+-$ver}"
8 numpkg="$(apt-cache showsrc "$fullpkg" 2>/dev/null | grep "^Package: $fullpkg" | wc -l)"
9 echo "$crate $ver $numpkg"
10 done
0 #!/bin/bash
1 # Filter list of packages by whether they're in Debian.
2 # You need to have an up-to-date APT cache for Debian unstable.
3 set -e
4
5 while read pkg ver; do
6 pkg="${pkg//_/-}"
7 numpkg="$(apt-cache showsrc rust-$pkg 2>/dev/null | grep "^Version: ${ver:+${ver}$}" | wc -l)"
8 echo "$pkg $ver $numpkg"
9 done
00 #!/bin/sh
1 # Given a full version string, output just the part that is significant for
2 # semver. i.e.. 0.x.* becomes 0.x and x.* becomes x for x != 0.
13 sed -r \
24 -e 's/([1-9]+)\.[0-9]+\.[0-9]+/\1/g' \
35 -e 's/(0\.[0-9]+)\.[0-9]+/\1/g'
1010 grep -l "$m" src/*/debian/copyright src/*/debian/debcargo.toml \
1111 | sed -nre 's,src/(.*)/debian/.*,\1,gp' \
1212 | sort -u \
13 | dev/filter-in-debian.sh \
13 | dev/filter-package-in-debian.sh \
1414 | sed -nre 's/^(.*)\s[1-9][0-9]*$/rust-\1/gp' \
1515 | xargs -r dcut "$@" dm --uid "$m" --allow
00 #!/bin/bash
11 # List pending branches that we have, but that are not in NEW.
2 # You might find it also useful to pipe the output of this into filter-in-debian.sh
2 # You might find it also useful to pipe the output of this into filter-package-in-debian.sh
33 set -e
44
55 git fetch origin --prune
2626 | sed -e 's/ v/ /g' \
2727 | dev/filter-semver.sh \
2828 | awk '!x[$0]++' \
29 | dev/filter-in-debian.sh \
29 | dev/filter-crate-in-debian.sh \
3030 | sed -nre 's/(.*) 0$/\1/gp'