--- /dev/null
+#!/bin/sh
+## DOC: cran2deb repopulate
+## DOC: repopulate the cran2deb database and configurations from a new cran2deb release
+## DOC:
+
+umask 002
+root=$1
+shift
+for x in $(find /etc/cran2deb/ -type f -name '*.in'); do
+ y=$(echo $x | sed -e 's,.in$,,')
+ sed -e "s:@ROOT@:$root:g" <"$x" >"$y"
+done
+
+# now do an update to reflect any config changes
+"$root/exec/update" "$root"
+
+(for fn in populate_licenses quit; do
+ cat "$root/data/$fn"
+done) | "$root/exec/license" "$root"
+
+(for fn in populate_depend_aliases populate_sysreq populate_forcedep quit; do
+ cat "$root/data/$fn"
+done) | "$root/exec/depend" "$root"
+