From: František Dvořák Date: Tue, 28 Aug 2012 14:55:16 +0000 (+0200) Subject: Helper commands to update Debian repo. X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=e7e4a3eb226ffde37157cb04fa948a4528905c9a;p=mock.git Helper commands to update Debian repo. --- diff --git a/mock.sh b/mock.sh index 94af052..9a1a3d0 100755 --- a/mock.sh +++ b/mock.sh @@ -206,6 +206,35 @@ while test -n "$1"; do package org.glite.px.emi-px emi-px ;; + push) + shift + repo=$1 + if test -z "$repo"; then + echo "Usage: $0 push OLD_REPO_DIR" + exit 1 + fi + + if test "$CONF" = "pbuilder"; then + (cd $repo; ls -1 | grep '\.changes$' | sort) > old + (cd $DEBREPO/$DEBDISTRO; ls -1 | grep '\.changes$' | sort) > new + diff -U0 old new | tail -n +3 | grep -v ^@ | grep '^+' | cut -c2- > changes + echo "New packages:" + cat changes + echo + + echo "Commands:" + cat << EOF +rm -rf $DEBREPO/$DEBDISTRO.prev +mv $DEBREPO/$DEBDISTRO $DEBREPO/$DEBDISTRO.prev +mkdir $DEBREPO/$DEBDISTRO +touch $DEBREPO/$DEBDISTRO/Packages +(cd $repo; dput -U local `cat changes | tr '\n' ' '`) +(cd $DEBREPO/$DEBDISTRO; rm -f Release.gpg; gpg -abs -o Release.gpg Release) +EOF + fi + + ;; + *) if test "$CONF" = "pbuilder"; then pbuilder_build "$1"