-
Notifications
You must be signed in to change notification settings - Fork 2
/
R-build-devel
executable file
·47 lines (44 loc) · 1.48 KB
/
R-build-devel
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 -x
# This script is run daily from cron
LOCALDIR=$HOME
PUBDIR=$HOME/R-pre
CRANDIR=cran.r-project.org:/srv/ftp/pub/R/src/base-prerelease
exec > $PUBDIR/build-devel.log 2>&1
# include tools build by Simon's recipes system
#export PATH=/Users/pd/tmp/bin:/opt/local/bin:/opt/R/x86_64/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/usr/local/gfortran/bin
# ---------- no changes should be necessary below this line
cd $LOCALDIR/r-devel
umask 022
cd R
svn up --accept theirs-full || exit 1
tools/rsync-recommended
curl -f http://journal.r-project.org/archive/RJournal.bib > ttt && mv ttt share/texmf/bibtex/bib/RJournal.bib
cd ..
rm -rf BUILD-dist
mkdir BUILD-dist
cd R
aclocal -I m4
autoconf
cd ../BUILD-dist
# Local config. Needed for tcl/tk
cp ../config.site .
../R/configure --enable-maintainer-mode || exit 1
# Standardize gram.c & friends
rm ../R/src/main/gram.c
rm ../R/src/library/tools/src/gram{Rd,Latex}.c
make -j4 || exit 1
(cd ../R ; svn commit -m 'maintainer-mode changes')
make dist || exit 1
RNOW=`echo R*.tar.gz`
cp $RNOW $PUBDIR
# XZ compressed version
RNOWBASE=`basename -s .gz $RNOW`
RNOWXZ=$RNOWBASE.xz
gunzip -c $RNOW | xz -9e > $RNOWXZ
cp $RNOWXZ $PUBDIR
# Make relative link (CRAN gets confused otherwise)
ln -sf $RNOW $PUBDIR/R-devel.tar.gz
ln -sf $RNOWXZ $PUBDIR/R-devel.tar.xz
find $PUBDIR -name R-devel_\*.gz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-devel_\*.xz -mmin +10000 -exec rm {} \;
rsync -aOvuz --no-p $PUBDIR/ $CRANDIR