X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trunk%2Fexec%2Frepopulate;h=72e23ccbd13135997e277fb945554a701884bd4b;hb=refs%2Fheads%2Fmaster;hp=08862dba2da40a7767fccf2cfc76289082e90d08;hpb=9a585e579f3cb0fbf62870629e2e8530f47510ae;p=cran2deb.git diff --git a/trunk/exec/repopulate b/trunk/exec/repopulate index 08862db..72e23cc 100755 --- a/trunk/exec/repopulate +++ b/trunk/exec/repopulate @@ -7,6 +7,13 @@ set -e dir=/etc/cran2deb +if [ -e /etc/cran2deb/config ]; then + . /etc/cran2deb/config; +elif [ -r ~/.cran2deb/config ]; then + dir=~/.cran2deb/ + . ~/.cran2deb/config; +fi; + if [ ! -d "$dir" ]; then echo "Dir $dir not existing." exit -1 @@ -16,7 +23,7 @@ umask 002 echo "Setting 'root' var to '$1'." root=$1 shift -for x in $(find /etc/cran2deb/ -type f -name '*.in'); do +for x in $(find "${dir}" -type f -name '*.in'); do #echo "x=$x" y=$(echo $x | sed -e 's,.in$,,') sed -e "s:@ROOT@:$root:g" <"$x" >"$y"