chcp only needs to run once
This commit is contained in:
parent
21d26da1b6
commit
3477eaf834
8
Rakefile
8
Rakefile
@ -27,6 +27,10 @@ new_post_ext = "markdown" # default new post file extension when using the n
|
|||||||
new_page_ext = "markdown" # default new page file extension when using the new_page task
|
new_page_ext = "markdown" # default new page file extension when using the new_page task
|
||||||
server_port = "4000" # port for preview server eg. localhost:4000
|
server_port = "4000" # port for preview server eg. localhost:4000
|
||||||
|
|
||||||
|
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
|
||||||
|
puts '## Set the codepage to 65001 for Windows machines'
|
||||||
|
`chcp 65001`
|
||||||
|
end
|
||||||
|
|
||||||
desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
|
desc "Initial setup for Octopress: copies the default theme into the path of Jekyll's generator. Rake install defaults to rake install[classic] to install a different theme run rake install[some_theme_name]"
|
||||||
task :install, :theme do |t, args|
|
task :install, :theme do |t, args|
|
||||||
@ -51,10 +55,6 @@ end
|
|||||||
desc "Generate jekyll site"
|
desc "Generate jekyll site"
|
||||||
task :generate do
|
task :generate do
|
||||||
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir)
|
||||||
if (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
|
|
||||||
puts '## Set the codepage to 65001 for Windows machines'
|
|
||||||
`chcp 65001`
|
|
||||||
end
|
|
||||||
puts "## Generating Site with Jekyll"
|
puts "## Generating Site with Jekyll"
|
||||||
system "compass compile --css-dir #{source_dir}/stylesheets"
|
system "compass compile --css-dir #{source_dir}/stylesheets"
|
||||||
system "jekyll"
|
system "jekyll"
|
||||||
|
Loading…
Reference in New Issue
Block a user