blob: 6e92116e13e5ea3d2b29da9fbe1265c4f2a174ac (
plain) (
tree)
|
|
#!/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 " -s Skip apt-get update/upgrade and pbuilder update"
}
# Loop over options
skip=false
while test -n "${1}"; do
case "$1" in
-s | --skip)
skip=true
shift
;;
-*)
echo "Error: Unknown option: $1" >&2
usage
exit 1
;;
*) # No more options
break
;;
esac
done
# Positional arguments
if [ $# -lt 1 ]; then usage; exit 1; fi
DIST=$1
# Update pbuilder chroot
if [ "$skip" = false ]
then
sudo apt-get update
sudo apt-get upgrade
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 r-cran-coda littler; do
#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 -s $i $DIST
done
|