forked from wopata/wkhtmltopdf-binary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added 64 bit linux version of wktohtml binary
- Loading branch information
Michael Collas
committed
Jun 7, 2011
1 parent
a279474
commit 541b437
Showing
5 changed files
with
15 additions
and
7 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,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 |
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,2 @@ | ||
# Having this file, which matches the name of the gem, | ||
# is required for the gem to be installed and called properly. |
Binary file not shown.
Binary file not shown.
Binary file not shown.