visualculture.prototype
clone your own copy | download snapshot

Snapshots | iceberg

No images in this repository’s iceberg at this time

Inside this repository

visualculture
text/x-ruby

Download raw (958 bytes)

#!/usr/bin/env ruby
dir = File.dirname(__FILE__)
$:.unshift File.join(dir, "..", "lib")
$:.unshift File.join(dir, "..")
require 'rubygems'
require 'vc-server'

require 'commander/import'

program :name, 'Visual Culture'
program :version, '0.0.1'
program :description, 'Sinatra-powered visual git interface for graphic design workflows'


command :server do |c|
  c.syntax = 'visualculture server [repositories]'
  c.description = 'Visual Culture will display [repositories]. Otherwise, it will display the repositories found in the directory it is run from, or the the current repository if it is run from within one.'
  c.action do |args, options|
    puts args
    if args.empty?
      if File.exist?(".git")
        args << Dir.pwd
      else
        Dir.glob('*/*.git',File::FNM_DOTMATCH) do |g|
          g[/\/\.git/] = ''
          args << g
        end
      end
    end
    VC.set("repositories", args) unless args.nil?
    VC::Server.run!
  end
end