public
Fork of sr/git-wiki
Description: A wiki engine that uses a Git repository as its data store.
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/al3x/git-wiki.git
al3x (author)
Thu Mar 06 10:15:26 -0800 2008
commit  c047fd0a5d9575d66401275a302af1bd93766f56
tree    9c1f1b86eb43bb59cb24c96260eb0b7ae6ec3f07
parent  26b9e050615129122047558cded3f6d60766a5a8
git-wiki / environment.rb
100644 20 lines (16 sloc) 0.48 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'rubygems'
require 'extensions'
require 'page'
 
%w(grit redcloth rubypants uv).each do |gem|
  require_gem_with_feedback gem
end
 
GIT_REPO = ARGV[0] || ENV['HOME'] + '/wiki'
GIT_DIR = File.join(GIT_REPO, '.git')
HOMEPAGE = 'Home'
UV_THEME = 'idle'
 
unless File.exists?(GIT_DIR) && File.directory?(GIT_DIR)
  FileUtils.mkdir_p(GIT_DIR)
  puts "Initializing repository in #{GIT_REPO}..."
  `/usr/bin/env git --git-dir #{GIT_DIR} init`
end
 
$repo = Grit::Repo.new(GIT_REPO)