Parent Directory
|
Revision Log
Revision 73 - (view) (download) (as text)
| 1 : | ranke | 71 | #!/bin/bash |
| 2 : | |||
| 3 : | # Script to automate backporting jags for CRAN | ||
| 4 : | |||
| 5 : | # Author: Johannes Ranke <jranke@uni-bremen.de> | ||
| 6 : | |||
| 7 : | # On Debian I used to run this script as root. On Ubuntu I now run it with | ||
| 8 : | # sudo -E sh backport_r-base.sh | ||
| 9 : | |||
| 10 : | # Preconditions: - shell variables DIST and ARCH | ||
| 11 : | # - sid sources in /etc/apt/sources/list | ||
| 12 : | # - cdbs installed (and maybe more) | ||
| 13 : | |||
| 14 : | export DEBEMAIL="jranke@uni-bremen.de" | ||
| 15 : | export DEBFULLNAME="Johannes Ranke" | ||
| 16 : | echo Distribution is $DIST | ||
| 17 : | echo Architecture is $ARCH | ||
| 18 : | |||
| 19 : | if [ -d jags-* ] | ||
| 20 : | then | ||
| 21 : | rm -rf `ls -d jags-*` | ||
| 22 : | fi | ||
| 23 : | |||
| 24 : | apt-get update | ||
| 25 : | apt-get source jags | ||
| 26 : | |||
| 27 : | cd jags-* | ||
| 28 : | |||
| 29 : | # Old version | ||
| 30 : | oldversion=`dpkg-parsechangelog | grep ^Version | cut -f2 -d " "` | ||
| 31 : | cranversion=$oldversion"~"$DIST"cran.0" | ||
| 32 : | |||
| 33 : | echo Old version is $oldversion | ||
| 34 : | echo CRAN version is $cranversion | ||
| 35 : | |||
| 36 : | # Add new version to changelog | ||
| 37 : | dch -v "${cranversion}" --force-distribution -D $DIST-cran -b "Backport from Debian unstable to Debian $DIST" | ||
| 38 : | |||
| 39 : | ranke | 73 | # Reverts for squeeze |
| 40 : | ranke | 71 | |
| 41 : | pbuilder update | ||
| 42 : | pdebuild --debbuildopts '-sa' --buildresult /home/ranke/svn/website/www/ranke/r-cran/$DIST-cran/ -- --distribution $DIST --basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz --aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache --buildplace /var/cache/pbuilder/$DIST-$ARCH/build | ||
| 43 : | if [ $? -ne 0 ]; then | ||
| 44 : | exit | ||
| 45 : | fi | ||
| 46 : | |||
| 47 : | cd .. |
| Johannes Ranke | ViewVC Help |
| Powered by ViewVC 1.0.1 |