-
Notifications
You must be signed in to change notification settings - Fork 2
/
R-build-prerelease
executable file
·55 lines (53 loc) · 2.01 KB
/
R-build-prerelease
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
#!/bin/bash -x
# This script is run daily from cron in the prerelease period
# It is assumed that version numbers etc. are already set up
LOCALDIR=$HOME
PUBDIR=$HOME/R-pre
CRANDIR=cran.r-project.org:/srv/ftp/pub/R/src/base-prerelease
exec > $PUBDIR/build-prerelease.log 2>&1
# ---------- no changes should be necessary below this line
cd $LOCALDIR/r-release-branch
umask 022
cd R
svn up --accept theirs-full || exit 1
#export CRAN_RSYNC='cran.at.r-project.org::CRAN'
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. Required for tcltk
cp ../config.site .
../R/configure --enable-maintainer-mode || exit 1
# Nov. 21, 2013, bison < 2.5 is flaky so ensure that we build gram.c here
rm ../R/src/main/gram.c
# Mar. 25, 2015, similarly for gramRd.c and gramLatex.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-patched.tar.gz
ln -sf $RNOWXZ $PUBDIR/R-patched.tar.xz
# restrict to R-patched/alpha/beta/rc --- R-devel handled by its own script
# note: find command wildcards do not include {foo,bar,baz} syntax
find $PUBDIR -name R-patched_\*.gz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-alpha_\*.gz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-beta_\*.gz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-rc_\*.gz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-patched_\*.xz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-alpha_\*.xz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-beta_\*.xz -mmin +10000 -exec rm {} \;
find $PUBDIR -name R-rc_\*.xz -mmin +10000 -exec rm {} \;
rsync -aOvuz --no-p --delete $PUBDIR/ $CRANDIR