Make filter-in-debian more precise, split into 2 scripts
Ximin Luo
4 years ago
|
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 | |
#!/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
|
0 | 0 |
#!/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.
|
1 | 3 |
sed -r \
|
2 | 4 |
-e 's/([1-9]+)\.[0-9]+\.[0-9]+/\1/g' \
|
3 | 5 |
-e 's/(0\.[0-9]+)\.[0-9]+/\1/g'
|
10 | 10 |
grep -l "$m" src/*/debian/copyright src/*/debian/debcargo.toml \
|
11 | 11 |
| sed -nre 's,src/(.*)/debian/.*,\1,gp' \
|
12 | 12 |
| sort -u \
|
13 | |
| dev/filter-in-debian.sh \
|
|
13 |
| dev/filter-package-in-debian.sh \
|
14 | 14 |
| sed -nre 's/^(.*)\s[1-9][0-9]*$/rust-\1/gp' \
|
15 | 15 |
| xargs -r dcut "$@" dm --uid "$m" --allow
|
0 | 0 |
#!/bin/bash
|
1 | 1 |
# 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
|
3 | 3 |
set -e
|
4 | 4 |
|
5 | 5 |
git fetch origin --prune
|
26 | 26 |
| sed -e 's/ v/ /g' \
|
27 | 27 |
| dev/filter-semver.sh \
|
28 | 28 |
| awk '!x[$0]++' \
|
29 | |
| dev/filter-in-debian.sh \
|
|
29 |
| dev/filter-crate-in-debian.sh \
|
30 | 30 |
| sed -nre 's/(.*) 0$/\1/gp'
|