-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added rakefile, install tasks, test tasks, build tasks, and changed x…
…sl template to look nicer
- Loading branch information
Showing
9 changed files
with
184 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
output/* | ||
Output/* | ||
.DS_Store | ||
.DS_Store | ||
README.txt | ||
docbook.pdf | ||
tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require 'fileutils' | ||
|
||
files = %w{make.rb README.txt hhc.exe jars xsl docbook.pdf generate generate.bat template} | ||
|
||
|
||
desc "create documentation" | ||
task :doc do | ||
`cd readme_files && rake docbook.pdf && cd ..` | ||
FileUtils.cp "readme_files/docbook.pdf", "./docbook.pdf" | ||
FileUtils.cp "README.rdoc","README.txt" | ||
end | ||
|
||
desc "test build chain" | ||
task :test do | ||
`#{File.expand_path(".")}/generate book mytestbook with_sample` | ||
`cd mytestbook && rm book.pdf && rake callout_images && rake book.pdf && open book.pdf && cd .. && rm -rf mytestbook` | ||
end | ||
|
||
task :create_zip => :doc do | ||
`zip -r output/docbook-1_1_0.zip #{files.join(" ")}` | ||
end | ||
|
||
task :install do | ||
dest = ENV["DIR"] || (RUBY_PLATFORM =~ /(win|w)32$/ ? "c:/docbook" : ENV["HOME"] + "/docbook") | ||
files.each do |file| | ||
target_file = File.join(dest, file) | ||
FileUtils.mkdir_p(File.dirname(target_file)) | ||
FileUtils.cp_r(file, target_file) | ||
puts " Copied #{file} to #{target_file}" | ||
end | ||
if RUBY_PLATFORM =~ /(win|w)32$/ | ||
puts "Be sure to add #{dest} to your path. See" | ||
puts "http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/path.mspx?mfr=true" | ||
puts "for more information." | ||
else | ||
`chmod +x #{dest}/generate` | ||
puts "Be sure to add" | ||
puts " EXPORT PATH=$PATH:#{dest}" | ||
puts " and optionally," | ||
puts " EXPORT SHORT_ATTENTION_SPAN_DOCBOOK_PATH=\"#{dest}\"" | ||
puts "to your .bashrc or .bash_login or .bash_profile" | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
cp readme_files/docbook.pdf ./ | ||
zip -r output/docbook.zip jars xsl docbook.pdf generate generate.bat template | ||
cp README.rdoc README.txt | ||
zip -r output/docbook-1_1_0.zip make.rb README.txt hhc.exe jars xsl docbook.pdf generate generate.bat template | ||
rm README.txt |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.