#!/usr/bin/rc ## DOC: cran2deb update ## DOC: update the cran2deb cache and database ## DOC: cran2deb update full ## DOC: force a full update of the cran2deb cache and database ## DOC: umask 022 root=$1 shift for (x in `{find /etc/cran2deb -type f -name '*.in'}) { y=`{echo $x | sed -e 's,.in$,,'} sed -e 's:@ROOT@:'^$root^':g' <$x >$y } mkdir -p /var/cache/cran2deb/results || exit 1 mini-dinstall --batch -c /etc/cran2deb/mini-dinstall.conf || exit 1 update_period=10800 if (~ $1 full || ![ -e /var/cache/cran2deb/cache.rda ] ) { delta=`{awk 'END{print '^$update_period^'+1}'