Skip to content

Commit fe690ca

Browse files
author
Michal Barla
committed
Support libre office as office home param for java
1 parent 18447cd commit fe690ca

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/docsplit.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ module Docsplit
1111

1212
HEADLESS = "-Djava.awt.headless=true"
1313

14-
OFFICE = RUBY_PLATFORM.match(/darwin/i) ? '' : '-Doffice.home=/usr/lib/openoffice'
14+
office ||= "/usr/lib/openoffice" if File.exists? '/usr/lib/openoffice'
15+
office ||= "/usr/lib/libreoffice" if File.exists? '/usr/lib/libreoffice'
16+
17+
OFFICE = RUBY_PLATFORM.match(/darwin/i) ? '' : "-Doffice.home=#{office}"
1518

1619
METADATA_KEYS = [:author, :date, :creator, :keywords, :producer, :subject, :title, :length]
1720

0 commit comments

Comments
 (0)