lib/softcover/builders/epub.rb in softcover-0.7.9 vs lib/softcover/builders/epub.rb in softcover-0.7.10
- old
+ new
@@ -182,10 +182,14 @@
@phantomjs ||= executable(filename, message)
end
# Returns the Inkscape executable (if available).
def inkscape
- filename = '/Applications/Inkscape.app/Contents/Resources/bin/inkscape'
+ filename = `which inkscape`.chomp
+ if filename.empty?
+ filename = '/Applications/Inkscape.app/Contents/Resources/bin/' +
+ 'inkscape'
+ end
message = "Install Inkscape (http://inkscape.org/)"
@inkscape ||= executable(filename, message)
end
# Strip attributes that are invalid in EPUB documents.
\ No newline at end of file