#!/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