3 ## DOC: cran2deb repopulate
4 ## DOC: repopulate the cran2deb database and configurations from a new cran2deb release
9 dir=${CRAN2DEB_CONFDIR:-/etc/cran2deb}
11 if [ ! -d "$dir" ]; then
12 echo "Dir $dir does not exist."
17 echo "Setting 'root' var to '$1'."
21 IFS="$(echo -ne '\0')"
22 for x in $(find "${dir}" -type f -name '*.in' -print0); do
24 sed -e "s:@ROOT@:$root:g" <"$x" > "${x%%.in}"
28 # now do an update to reflect any config changes
29 echo "Starting '$root/exec/update"
30 "$root/exec/update" "$root"
32 (for fn in populate_licenses quit; do
34 done) | "$root/exec/license" "$root"
36 (for fn in populate_depend_aliases populate_sysreq populate_forcedep quit; do
38 done) | "$root/exec/depend" "$root"