diff options
author | ranke <ranke@f247ebf9-aa24-0410-a698-f940e971ad2b> | 2015-12-12 10:38:15 +0000 |
---|---|---|
committer | ranke <ranke@f247ebf9-aa24-0410-a698-f940e971ad2b> | 2015-12-12 10:38:15 +0000 |
commit | 1cd094b531ff2a9f1d6acb4b781c118d12b51343 (patch) | |
tree | 86682d7e3c76817652ba74b82d3047a75ea8f51f /backport_others | |
parent | 28da2e962565a4ded17c427776529b43f3527186 (diff) |
New and simplified organisation of backporting scripts
Now backports for different distributions (squeeze, wheezy, jessie) can be
started from the same working directory. Also, single package builds
can be done without editing a script.
git-svn-id: svn+ssh://stiller/home/schatz/reps/r-backports@111 f247ebf9-aa24-0410-a698-f940e971ad2b
Diffstat (limited to 'backport_others')
-rw-r--r-- | backport_others | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/backport_others b/backport_others new file mode 100644 index 0000000..697ede1 --- /dev/null +++ b/backport_others @@ -0,0 +1,50 @@ +#!/bin/bash + +# Author: Johannes Ranke <jranke@uni-bremen.de> + +# Script to automate backporting for CRAN +# Make sure the R version in ./backport is correctly set and the pbuilder chroot is updated + +usage() +{ +echo "Usage: ./backport_others [options] squeeze|wheezy|jessie" +echo "Options:" +echo " -n Skip apt-get update/upgrade and pbuilder update" +} + +update=true +while getopts ":n" flag; do + case $flag in + n) + update=false + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + ;; + esac + shift $((OPTIND-1)) +done + +# Check for number of arguments +if [ $# -lt 1 ]; then usage; exit 1; fi +DIST=$1 + +# Update pbuilder chroot +if [ "$update" = true ] +then + sudo -E pbuilder update +fi + +# Validate distribution argument +if [ $DIST != "squeeze" ] && [ $DIST != "wheezy" ] && [ $DIST != "jessie" ]; then usage; exit 1; fi +export DIST + +# When doing a new repository, lattice, r-cran-mass and survival have to be +# built first, then nlme and rmatrix, then the rest + +# Packages to backport to squeeze/wheezy/jessie (without rpy2): +for i in lattice nlme rmatrix mgcv boot cluster codetools foreign kernsmooth r-cran-class r-cran-coda r-cran-spatial r-cran-nnet r-cran-mass rodbc rpart survival r-cran-littler rpy rkward r-cran-rjags; do + + ./backport -n $i $DIST + +done |