#!/usr/bin/tclsh
# Install Mathematica fonts into tetex

set startdir [lindex $argv 0]
if {$startdir == ""} {
  set startdir "/Users"
}

puts "find $startdir -name *.tuo"

set files [split [exec find $startdir -name "*.tuo"] "\n"]
puts "files = $files"
foreach file $files {
  set dir [file dirname $file]
  puts "dir = $dir"
  cd $dir
  exec texutil --purge ;# >&@ stdout
  file delete $file
}

