#!/bin/bash # # add changes file #reprepro --ask-passphrase -b . -V -C main include edgy CHANGES_FILE # # remove package #reprepro --ask-passphrase -b . -V -C main remove edgy PACKAGE_NAME # # generate snapshot # reprepro --ask-passphrase -b . -V -C main gensnapshot unstable 20Ago2007 # get_version() { case $1 in *etch*) echo "etch" ;; *lenny*) echo "lenny" ;; *squeeze*) echo "squeeze" ;; *testing*) echo "testing" ;; *hardy*) echo "hardy" ;; *intrepid*) echo "intrepid" ;; *maverick*) echo "maverick" ;; *lucid*) echo "lucid" ;; *karmic*) echo "karmic" ;; *jaunty*) echo "jaunty" ;; *gutsy*) echo "gutsy" ;; *feisty*) echo "feisty" ;; *edgy*) echo "edgy" ;; *dapper*) echo "dapper" ;; *) echo "unstable" ;; esac } if [ "$SECTION" = "" ]; then SECTION="main" echo "WARNING: using section main, overwrite with SECTION=xxxx" echo fi PKGRESULT=/var/cache/pbuilder/result/ [ -d /home/pbuilder/result ] && PKGRESULT=/home/pbuilder/result/ newpkg=$(find $PKGRESULT -name "*$1*changes") arch="" if [ "$2" != "" ]; then arch="-A $2" fi for pkg in $newpkg; do echo "reprepro --ask-passphrase -b . $arch -V -C $SECTION include $(get_version $pkg) $pkg ;\\" done echo "echo DONE"