summaryrefslogblamecommitdiff
path: root/backport_tk.sh
blob: 35759eb722f06442a3f15961d6d930234ed595a4 (plain) (tree)









































                                                                                                                                                                                                                                                                                   
#!/bin/bash

# Script to automate backporting tk8.6 for CRAN

# Author: Johannes Ranke <jranke@uni-bremen.de>

# Preconditions: - shell variables DIST and ARCH
#                - sid sources in /etc/apt/sources/list
#                - cdbs installed (and maybe more)

export DEBEMAIL="jranke@uni-bremen.de"
export DEBFULLNAME="Johannes Ranke"
echo Distribution is $DIST
echo Architecture is $ARCH

if [ -d tk8.6-* ]
then
    rm -rf `ls -d tk8.6-*`
fi

apt-get update
apt-get source tk8.6

cd tk8.6-*

# Old version
oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "`
cranversion=$oldversion"~"$DIST"cran.0"

echo Old version is $oldversion
echo CRAN version is $cranversion

# Add new version to changelog
dch -v "${cranversion}" --force-distribution -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST"

pbuilder update
pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran3/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache --buildplace /var/cache/pbuilder/$DIST-$ARCH/build
if [ $? -ne 0 ]; then
    exit 
fi

cd ..

Contact - Imprint