]> git.proxmox.com Git - rustc.git/blob - debian/update-version.sh
Merge tag 'upstream/1.16.0+dfsg1'
[rustc.git] / debian / update-version.sh
1 #!/bin/bash
2 prev_stable() {
3 local V=$1
4 python -c 'import sys; k=map(int,sys.argv[1].split(".")); k[1]-=1; print ".".join(map(str,k))' "$V"
5 }
6
7 update() {
8 local ORIG=$1 NEW=$2
9
10 ORIG_M1=$(prev_stable $ORIG)
11 NEW_M1=$(prev_stable $NEW)
12 ORIG_R="${ORIG/./\\.}" # match a literal dot, otherwise this might sometimes match e.g. debhelper (>= 9.20141010)
13
14 sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" \
15 -e "s|rustc (<= ${ORIG_R}|rustc (<= $NEW|g" \
16 -e "s|rustc (>= ${ORIG_M1/./\\.}|rustc (>= ${NEW_M1}|g" control
17
18 git mv libstd-rust-$ORIG.lintian-overrides libstd-rust-$NEW.lintian-overrides
19 sed -i -e "s|libstd-rust-${ORIG_R}|libstd-rust-$NEW|g" libstd-rust-$NEW.lintian-overrides
20 }
21
22 update 1.14 1.15