]> git.donarmstrong.com Git - cran2deb.git/blobdiff - pkg/trunk/exec/update
fix umask to 002
[cran2deb.git] / pkg / trunk / exec / update
index fb4c01f2d444454452225ffdf770340e547f03e4..7bcc78f0ecf4bab77fca4f6a87bf6d50570a6af4 100755 (executable)
@@ -1,17 +1,15 @@
 #!/usr/bin/rc
-umask 022
+## 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
-for (x in `{find $root/etc -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
-if ([ ! -e $root/var/archive ]) {
-    # I symbolically link this into /var/www/
-    mkdir $root/var/archive || exit 1
-}
-mini-dinstall --batch -c $root/etc/mini-dinstall.conf || 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}' </dev/null}
@@ -25,11 +23,7 @@ if (![ -e /var/cache/cran2deb/cache.rda ] || [ $delta -gt $update_period ]) {
     if ([ -e /var/cache/pbuilder/base-cran2deb.tgz ]) {
         mode=update
     }
-    sudo pbuilder $mode --override-config --configfile $root/etc/pbuilderrc
+    sudo pbuilder $mode --override-config --configfile /etc/cran2deb/pbuilderrc
     $root/exec/update_cache $root
 }
-if (![ -e /var/cache/cran2deb/cran2deb.db ] || [ $delta -gt $update_period ]) {
-    cat $root/data/^(populate_licenses quit) | $root/exec/license $root
-    cat $root/data/^(populate_depend_aliases populate_sysreq populate_forcedep quit) | $root/exec/depend $root
-}