blob: 43d500d0a70e248232fc0e21c974eb1a90784502 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
#!/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
# Creates a source package and binary packages for the following architecture
ARCH=i386
export ARCH
usage()
{
echo "Usage: ./backport_others [options] stretch|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 apt and pbuild chroot
if [ "$skip" = false ]
then
sudo apt-get update
sudo apt-get upgrade
sudo -E pbuilder update \
--distribution $DIST \
--basetgz /var/cache/pbuilder/$DIST-$ARCH-base.tgz \
--aptcache /var/cache/pbuilder/$DIST-$ARCH/aptcache
fi
# Validate distribution argument
if [ $DIST != "stretch" ] && [ $DIST != "jessie" ]; then usage; exit 1; fi
export DIST
# When doing a new repository, do lattice, r-cran-mass
# then rmatrix,
# then survival and nlme, then the rest
# Packages to backport:
#for i in dh-r; do # dh is not available in jessie, therefore start with this
#for i in lattice r-cran-mass; do
#for i in rmatrix; do
#for i in survival nlme; do
#for i in rpart mgcv boot cluster codetools foreign kernsmooth r-cran-class r-cran-coda r-cran-spatial r-cran-nnet rodbc littler rpy rpy2 rkward; 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 littler rpy rpy2 rkward; do
./backport -s $i $DIST
done
|