Add tex requirement
* Detect `latex' and `bibtex' commands. * Recommend installing MacTeX when no LaTeX installation is found. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
8f88850cdb
commit
2d445d54b5
@ -78,6 +78,8 @@ private
|
|||||||
MysqlInstalled.new(tag)
|
MysqlInstalled.new(tag)
|
||||||
when :postgresql
|
when :postgresql
|
||||||
PostgresqlInstalled.new(tag)
|
PostgresqlInstalled.new(tag)
|
||||||
|
when :tex
|
||||||
|
TeXInstalled.new(tag)
|
||||||
else
|
else
|
||||||
raise "Unsupported special dependency #{spec}"
|
raise "Unsupported special dependency #{spec}"
|
||||||
end
|
end
|
||||||
|
@ -271,3 +271,27 @@ class PostgresqlInstalled < Requirement
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class TeXInstalled < Requirement
|
||||||
|
fatal true
|
||||||
|
env :userpaths
|
||||||
|
|
||||||
|
def satisfied?
|
||||||
|
tex = which 'tex'
|
||||||
|
latex = which 'latex'
|
||||||
|
not tex.nil? and not latex.nil?
|
||||||
|
end
|
||||||
|
|
||||||
|
def message; <<-EOS.undent
|
||||||
|
A LaTeX distribution is required to install.
|
||||||
|
|
||||||
|
You can install MacTeX distribution from:
|
||||||
|
http://www.tug.org/mactex/
|
||||||
|
|
||||||
|
Make sure that its bin directory is in your PATH before proceed.
|
||||||
|
|
||||||
|
You may also need to restore the ownership of Homebrew install:
|
||||||
|
sudo chown -R $USER `brew --prefix`
|
||||||
|
EOS
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user