blob: 71e30f93d12779ee8b3a48ea9f0876961d82ecaf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/bin/bash
# Script to automate backporting jags for CRAN
# Author: Johannes Ranke <jranke@uni-bremen.de>
# On Debian I used to run this script as root. On Ubuntu I now run it with
# sudo -E sh backport_r-base.sh
# 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 jags-* ]
then
rm -rf `ls -d jags-*`
fi
apt-get update
apt-get source jags
cd jags-*
# 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"
# Reverts for squeeze
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 ..
|