X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2Fexec%2Frepopulate;h=08862dba2da40a7767fccf2cfc76289082e90d08;hb=9639f4fea2c490ae3cc188370c050a7ad76c1e77;hp=ab3ea6039fcaf5720569a8f962d808dc48dac14a;hpb=256e82f0e03195ececa992342b4a96c5bf89f3fa;p=cran2deb.git diff --git a/trunk/exec/repopulate b/trunk/exec/repopulate index ab3ea60..08862db 100755 --- a/trunk/exec/repopulate +++ b/trunk/exec/repopulate @@ -1,17 +1,29 @@ #!/bin/sh + ## DOC: cran2deb repopulate ## DOC: repopulate the cran2deb database and configurations from a new cran2deb release ## DOC: +set -e + +dir=/etc/cran2deb +if [ ! -d "$dir" ]; then + echo "Dir $dir not existing." + exit -1 +fi + umask 002 +echo "Setting 'root' var to '$1'." root=$1 shift for x in $(find /etc/cran2deb/ -type f -name '*.in'); do + #echo "x=$x" 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 +echo "Starting '$root/exec/update" "$root/exec/update" "$root" (for fn in populate_licenses quit; do