this has been done before. i can't remember who wrote it
and i couldnt find it in the contrib index.

#!/bin/rc

fn get_dirs {
        tmp = /tmp/$pid ^_dirs
        echo -n > $tmp

        for (f in `{du -nf $root_in | awk '{print $2}' }) 
                ls -l $f | grep '^d' | awk '{print $10}' >> $tmp
        dirs = `{sort $tmp}
        rm $tmp
}

root_in=$1
root_out=$2

if(~ $3 '') 
        get_dirs;
if not 
        dirs = `{cat $3};

for(i in $dirs){
        o=`{echo $i | awk '{gsub(ENVIRON["root_in"], ENVIRON["root_out"], $0); 
print}'}
        echo bind -bc $i $o
}


theres also divergefs.

--
cinap

Reply via email to