X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=branch%2Fpatch%2Fexec%2Fupdate;fp=branch%2Fpatch%2Fexec%2Fupdate;h=7bcc78f0ecf4bab77fca4f6a87bf6d50570a6af4;hb=75ac4a666a0faa4a2d09aeed4db94746c097b1ca;hp=0000000000000000000000000000000000000000;hpb=7c74d4e371b7ecda2035aa106918b0427818cacf;p=cran2deb.git diff --git a/branch/patch/exec/update b/branch/patch/exec/update new file mode 100755 index 0000000..7bcc78f --- /dev/null +++ b/branch/patch/exec/update @@ -0,0 +1,29 @@ +#!/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 002 +root=$1 +shift +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}'