X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2Fexec%2Fupdate;h=b162cc84b6a2e0d8fd709c22f0e81e2f0f776149;hb=515315e9f4cad5288911eae0a7a574d091aab698;hp=7bcc78f0ecf4bab77fca4f6a87bf6d50570a6af4;hpb=e48407cfb4f4911aaeb8dde94d386cc16a600822;p=cran2deb.git diff --git a/trunk/exec/update b/trunk/exec/update index 7bcc78f..b162cc8 100755 --- a/trunk/exec/update +++ b/trunk/exec/update @@ -1,29 +1,43 @@ -#!/usr/bin/rc +#!/bin/bash + ## 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: +set -e + umask 002 root=$1 +if [ -z "$root" ]; then + echo "You need to specify the root of your installation, i.e. the folder in which to find the exec subdirectory." + exit 1 +fi + 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}'