<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -56,7 +56,9 @@ PUSH
 end
 
 dbname = ARGV[1]
-puts &quot;Running #{command} on #{dbname}.&quot;
+dirname = ARGV[2] || &quot;views&quot;
+
+puts &quot;Running #{command} on #{dbname} from directory #{dirname}.&quot;
 
 require File.expand_path(File.dirname(__FILE__)) + '/../couchrest'
 require File.expand_path(File.dirname(__FILE__)) + '/../vendor/jsmin/lib/jsmin'
@@ -84,7 +86,7 @@ end
 case command
 when &quot;push&quot; # files to views
   views = {}
-  viewfiles = Dir.glob(File.join(&quot;views&quot;,&quot;**&quot;,&quot;*.js&quot;)) # todo support non-js views
+  viewfiles = Dir.glob(File.join(dirname,&quot;**&quot;,&quot;*.js&quot;)) # todo support non-js views
   libfiles = viewfiles.select{|f|/lib\.js/.match(f)}
   libs = open(libfiles[0]).read if libfiles[0]
   all = (viewfiles-libfiles).collect do |file|
@@ -137,7 +139,7 @@ when &quot;pull&quot; # views to files
       if mapname
         # save map
         mapfunc = views[mapname][&quot;map&quot;]
-        mapfile = File.join(&quot;views&quot;,directory,&quot;#{g}-map.js&quot;) # todo support non-js views
+        mapfile = File.join(dirname,directory,&quot;#{g}-map.js&quot;) # todo support non-js views
         File.open(mapfile,'w') do |f|
           f.write mapfunc
         end
@@ -147,7 +149,7 @@ when &quot;pull&quot; # views to files
       if reducename
         # save reduce
         reducefunc = views[reducename][&quot;reduce&quot;]
-        reducefile = File.join(&quot;views&quot;,directory,&quot;#{g}-reduce.js&quot;) # todo support non-js views
+        reducefile = File.join(dirname,directory,&quot;#{g}-reduce.js&quot;) # todo support non-js views
         File.open(reducefile,'w') do |f|
           f.write reducefunc
         end</diff>
      <filename>script/couchview</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ee53792a25b7e76f9c0c317e00092cf5096add40</id>
    </parent>
  </parents>
  <author>
    <name>Chris Anderson</name>
    <email>jchris@grabb.it</email>
  </author>
  <url>http://github.com/filterfish/couchrest/commit/170e61f0f1f1ead05aacf04c903660f21472452f</url>
  <id>170e61f0f1f1ead05aacf04c903660f21472452f</id>
  <committed-date>2008-06-09T16:01:24-07:00</committed-date>
  <authored-date>2008-06-09T16:01:24-07:00</authored-date>
  <message>couchview dirs</message>
  <tree>b41e5b22c813a0d73bc78c1494f4d005b9cc5495</tree>
  <committer>
    <name>Chris Anderson</name>
    <email>jchris@grabb.it</email>
  </committer>
</commit>
