X-Git-Url: https://piware.de/gitweb/?a=blobdiff_plain;f=debian-backport-cockpit;h=a0284ed323fa4bb24d7355e29873a4a74998c7f5;hb=refs%2Fheads%2Fmaster;hp=b3d34407f6f03814387f41dc96a064051e47a3db;hpb=1c4d7fe0da9766c29f29b9ab809af0e380e87de7;p=bin.git diff --git a/debian-backport-cockpit b/debian-backport-cockpit index b3d3440..a0284ed 100755 --- a/debian-backport-cockpit +++ b/debian-backport-cockpit @@ -1,37 +1,33 @@ #!/bin/sh set -eu +PACKAGE=${1:-cockpit} series_ver() { - 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) + ver=$(wget -q -O- http://ftp.debian.org/debian/dists/${1}/main/source/Sources.xz | xz -d | grep-dctrl -n -sVersion -XP $PACKAGE | sort -u | tail -n1) + ver=${ver%~bpo*} } upload() { - debuild -S -sd -nc -v$ver - cat ../cockpit_*_source.changes + cat ../${PACKAGE}*_source.changes read -p "Upload? [y/N] " answer if [ "$answer" = y ]; then - dput ../cockpit_*_source.changes + dput ../${PACKAGE}_*_source.changes fi cd .. rm *bpo* - rm -r cockpit-* + rm -r ${PACKAGE}-* } +rm -rf /tmp/backport mkdir /tmp/backport cd /tmp/backport -apt-get source cockpit -cd cockpit-* +apt-get source $PACKAGE +cd ${PACKAGE}-* -# stretch -series_ver stretch-backports -dch --local ~bpo9+ --distribution stretch-backports --force-distribution "No-change backport to Debian Stretch" -upload - -# jessie -dpkg-source -x *.dsc -cd cockpit-* -series_ver jessie-backports-sloppy -dch --local ~bpo8+ --distribution jessie-backports-sloppy --force-distribution "No-change backport to Debian Jessie" +# bookworm +series_ver bookworm-backports +dch --local ~bpo12+ --distribution bookworm-backports --force-distribution "No-change backport to Debian Bookworm" +debuild -S -sd -nc -v$ver upload