On Thu, Jul 22, 2004 at 09:45:26PM -0500, David Masover wrote:
>| UPDATE formatting SET policy='never\0' WHERE policy='smart\0' RECURSE;
>| instead of just
>| UPDATE formatting SET policy='never\0' RECURSE;
>| which may break something else...
>
>Both should be allowed.  Can that be done now?  And with echo, not SQL.

I can't check now but maybe:

for dir in $(find . -type d); do
  format=$(cat $dir/..metas/plugin/formatting)
  if [ $format == "smart\0" ]; then
    echo -e 'never\0' > $format
    for file in $(find $dir -type f); do
      cat file > /dev/null
    done
  fi
done

IIRC the access required to change the file's formatting policy on the
file system was read-only. If you actually had to change something, replace
cat with chmod +x && chmod -x or something.

Namesys guys want to comment?-)

-- 
mjt

Reply via email to