Re: [PATCH] git-latexdiff: new command in contrib, to use latexdiff and Git
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Feb 16, 2012, 08:59 UTC
- Message-ID
- <vpqy5s3i26m.fsf@bauges.imag.fr>
- In-Reply-To
- <94614DF7-9EE3-47CB-BC6E-97069597557E@gmail.com>
Steven Michalske <smichalske@gmail.com> writes:
> On Mac OS X use the open command and the OS will use the correct viewer chosen by the user > > open "$pdffile"
Unfortunately, open also exists on my system, but does not do that at all. I'm squashing this into the next version:
--- a/contrib/latex/git-latexdiff +++ b/contrib/latex/git-latexdiff @@ -120,7 +120,13 @@ if [ "$old" = "" ]; then fi verbose "Auto-detecting PDF viewer" -for command in xdg-open evince okular xpdf acroread; do +candidates="xdg-open evince okular xpdf acroread" +if [ "$(uname)" = Darwin ]; then + # open exists on GNU/Linux, but does not open PDFs + candidates="open $candidates" +fi + +for command in $candidates; do if [ "$PDFVIEWER" = "" ]; then if command -v "$command" >/dev/null 2>&1; then PDFVIEWER="$command"
-- Matthieu Moy http://www-verimag.imag.fr/~moy/