<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/syntax_css/templates/.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,30 +1,34 @@
 class SyntaxCssGenerator &lt; Rails::Generator::Base
   def manifest
     record do |m|
+      # This whole copy CSS files to the tamplates folder isn't very clean
+      # generator library doesn't let me specify an absolute path for m.file so this is a compromise
+      # FIXME: make this cleaner
       theme = args[0]
-      copy_css_from_uv
-      css_files = css_from_templates
+
+      themes = Uv.themes
       
       if theme == &quot;all&quot;
-        m.directory(&quot;public/stylesheets/syntax&quot;)      
-        css_files.each do |css|
-          m.file(&quot;stylesheets/syntax/#{css}&quot;, &quot;public/stylesheets/syntax/#{css}&quot;)
+        m.directory(&quot;public/stylesheets/syntax&quot;)
+        copy_theme_from_uv(*themes)
+        themes.each do |css|
+          m.file(&quot;/#{css}.css&quot;, &quot;public/stylesheets/syntax/#{css}.css&quot;)
         end
       elsif theme == &quot;list&quot;
-        puts css_files.collect{|f| File.basename(f, &quot;.css&quot;)}.sort.join(&quot;\n&quot;)
+        puts themes.sort.join(&quot;\n&quot;)
       else
-        css = css_files.detect do |s|
-          s =~ /^#{theme}\.css$/
+        css = themes.detect do |s|
+          s.downcase.strip == theme.downcase.strip
         end
+        
         if css
           m.directory(&quot;public/stylesheets/syntax&quot;)
-          m.file(&quot;stylesheets/syntax/#{css}&quot;, &quot;public/stylesheets/syntax/#{css}&quot;)
+          m.file(&quot;#{css}.css&quot;, &quot;public/stylesheets/syntax/#{css}.css&quot;)
         else
           usage_message
           puts &quot;Could not find theme named #{theme}.&quot;
         end
       end
-      delete_css_files_from_template
     end
   end
   
@@ -37,27 +41,9 @@ class SyntaxCssGenerator &lt; Rails::Generator::Base
     puts &quot;Usage: #{$0} syntax_css [all | list | theme_name]&quot;
   end
   
-  def copy_css_from_uv
-    puts &quot;Copying CSS files from Ultraviolet&quot;
-    css_path = File.join(File.dirname(__FILE__), &quot;templates&quot;, &quot;stylesheets&quot;, &quot;syntax&quot;)
-    FileUtils.mkdir_p(css_path)
-
-    Dir.glob(File.join(Uv.path, &quot;render&quot;, &quot;xhtml&quot;, &quot;files&quot;, &quot;css&quot;, &quot;*.css&quot;)) do |css|
-      FileUtils.cp(css, css_path)
-    end
-  end
-  
-  def delete_css_files_from_template
-    css_from_templates.each do |file|
-      FileUtils.rm(source_path(&quot;stylesheets/syntax/#{file}&quot;))
-    end
-  end
-  
-  def css_from_templates
-    css = []
-    Dir.glob(File.join(source_path(&quot;stylesheets/syntax&quot;), &quot;*.css&quot;)) do |css|
-      css &lt;&lt; File.basename(css)
+  def copy_theme_from_uv(*args)
+    args.each do |theme|
+      FileUtils.cp(File.join(Uv.path, &quot;render&quot;, &quot;xhtml&quot;, &quot;files&quot;, &quot;css&quot;, &quot;#{theme}.css&quot;), source_path(&quot;/&quot;))
     end
-    css
   end
 end
\ No newline at end of file</diff>
      <filename>generators/syntax_css/syntax_css_generator.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3992921d2b560062b1717c92fc7571e5e117f6e1</id>
    </parent>
  </parents>
  <author>
    <name>Arya Asemanfar</name>
    <email>arya.asemanfar@gmail.com</email>
  </author>
  <url>http://github.com/arya/tm_syntax_highlighting/commit/e38b5c67f3e05f4cfd5b3128fbf030e1faea1124</url>
  <id>e38b5c67f3e05f4cfd5b3128fbf030e1faea1124</id>
  <committed-date>2008-04-30T14:40:54-07:00</committed-date>
  <authored-date>2008-04-30T14:22:51-07:00</authored-date>
  <message>reworked CSS file copying, it's still lame but it's a compromise</message>
  <tree>aa1630dcaccfba69a10d917cfdfe1d9d67aac02e</tree>
  <committer>
    <name>Arya Asemanfar</name>
    <email>arya.asemanfar@gmail.com</email>
  </committer>
</commit>
