def fcp(src, dst)
  open(src, 'r'){|srcf|
  open(dst, 'w'){|dstf|
  while srcf.gets do dstf.print end
  }}
end

def dir(base)
  Dir.foreach(base) do |entry|
    next if /^\./ =~ entry
    path = File.join(base, entry)
    if test ?d, path
      print "copy #{CSS} to #{path}\n"
      fcp './'+CSS, path+'/'+CSS
      dir path
    end
  end
end

CSS = 'pi.css'
dir ARGV.shift || '.'
