Skip to content

Commit

Permalink
added 64 bit linux version of wktohtml binary
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Collas committed Jun 7, 2011
1 parent a279474 commit 541b437
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
20 changes: 13 additions & 7 deletions bin/wkhtmltopdf
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#!/usr/bin/ruby

if RUBY_PLATFORM =~ /linux/
executable = 'wkhtmltopdf_linux_386'
elsif RUBY_PLATFORM =~ /darwin/
executable = 'wkhtmltopdf_darwin_386'
else
raise "Invalid platform. Must be running linux or intel-based Mac OS."
executable = case RUBY_PLATFORM
when /64.*linux/
'wkhtmltopdf_linux_amd64'
when /linux/
'wkhtmltopdf_linux_386'
when /darwin/
'wkhtmltopdf_darwin_386'
else
raise "Invalid platform. Must be running linux or intel-based Mac OS."
end

arguments = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }

executable = File.join(File.dirname(__FILE__), executable)
system(executable + " " + $*.join(" "))
r = system(executable + " " + arguments.join(" "))

exit r ? 0 : 1
2 changes: 2 additions & 0 deletions bin/wkhtmltopdf-binary.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Having this file, which matches the name of the gem,
# is required for the gem to be installed and called properly.
Binary file modified bin/wkhtmltopdf_darwin_386
Binary file not shown.
Binary file modified bin/wkhtmltopdf_linux_386
Binary file not shown.
Binary file added bin/wkhtmltopdf_linux_amd64
Binary file not shown.

0 comments on commit 541b437

Please sign in to comment.