system-maintenance: Update flatpaks
[bin.git] / debian-backport-cockpit
1 #!/bin/sh
2 set -eu
3
4 series_ver() {
5     ver=$(wget -q -O- http://ftp.debian.org/debian/dists/${1}/main/source/Sources.xz | xz -d | grep-dctrl -n -sVersion -P cockpit | sort -u | tail -n1)
6     ver=${ver%~bpo*}
7 }
8
9 upload() {
10     cat ../cockpit_*_source.changes
11
12     read -p "Upload? [y/N] " answer
13     if [ "$answer" = y ]; then
14         dput ../cockpit_*_source.changes
15     fi
16
17     cd ..
18     rm *bpo*
19     rm -r cockpit-*
20 }
21
22 mkdir /tmp/backport
23 cd  /tmp/backport
24 apt-get source cockpit
25 cd cockpit-*
26
27 # bullseye
28 series_ver bullseye-backports
29 debian/adjust-for-release bullseye
30 dch --local ~bpo10+ --distribution bullseye-backports --force-distribution "No-change backport to Debian Bullseye"
31 debuild -S -sd -nc -v$ver
32 upload