]> piware.de Git - bin.git/commitdiff
ubuntu-backport-cockpit: Support local dsc master
authorMartin Pitt <martin@piware.de>
Sun, 25 May 2025 10:49:27 +0000 (12:49 +0200)
committerMartin Pitt <martin@piware.de>
Sun, 25 May 2025 10:49:27 +0000 (12:49 +0200)
ubuntu-backport-cockpit

index 07e8c08c2756eb30269309d37c212f7c60af859e..b1d182893b82113be8cf665adc8fb21217f5bd72 100755 (executable)
@@ -4,6 +4,8 @@ PACKAGE=${1:-cockpit}
 TARGET=${2:-noble}
 POCKET="${TARGET}-backports"
 
+[ -z "${3:-}" ] || DSC=$(realpath "$3")
+
 series_ver() {
     ver=$(wget -q -O- http://de.archive.ubuntu.com/ubuntu/dists/$1/universe/source/Sources.xz | xz -d | grep-dctrl -n -sVersion -XP $PACKAGE | sort -u | tail -n1)
     ver=${ver%~bpo*}
@@ -28,7 +30,11 @@ upload() {
 rm -rf /tmp/backport
 mkdir /tmp/backport
 cd  /tmp/backport
-apt-get source $PACKAGE
+if [ -n "${DSC:-}" ]; then
+    dpkg-source -x "$DSC"
+else
+    apt-get source $PACKAGE
+fi
 cd ${PACKAGE}-*
 
 case "$TARGET" in