elliottcable / git-blog

Ridiculously minimalist blogware - write your posts in $EDITOR, then `git-push blog master`. Boom, new posts published.

This URL has Read+Write access

elliottcable (author)
Sat Sep 20 17:02:47 -0700 2008
commit  e61a0c7880d9ba6e8c793ad674148dfcbb86db8e
tree    4e99ced4d8099444b7e573a7400f083c3ae838b3
parent  54d078bfee693398a1011874257020ad7a6fdd59
git-blog / Rakefile.rb
100644 21 lines (18 sloc) 0.704 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'rubygems'
require 'fileutils'
include FileUtils
 
$:.unshift File.expand_path('./lib')
require 'git-blog/core'
 
desc 'Create a new git-blog'
task :create, :destination do |_, params|
  destination = params[:destination].nil? ? './blog' : params[:destination]
  destination = File.expand_path destination
  
  mkdir destination rescue nil
  File.open destination/:Rakefile.rb, File::RDWR|File::TRUNC|File::CREAT do |rakefile|
    rakefile.puts "$:.unshift File.expand_path('#{GitBlog::Scope / :lib}')"
    rakefile.puts "require 'git-blog'"
    rakefile.print "\n"; rakefile.close
  end
  puts "** git-blog created at #{destination}!"
  puts "** now `cd #{destination}` and `rake initialize`!"
end