# This adds WebTree.txt topics in all the webs
# from the one stored here

for i in data/*/WebHome.txt; do
  wt_src="$1/WebTree.txt"
  wt_dest="${i%/*}/WebTree.txt"
  if ! cmp -s "$wt_src" "$wt_dest"; then
    if ! cp "$wt_src" "$wt_dest" 2>/dev/null; then
      echo "*** Warning: cannot update $wt_dest"
    else
      chmod a+rw  "$wt_dest"
    fi
  fi
done
