Subject: Re: [PATCH v3] git-latexdiff: new command in contrib, to use latexdiff and Git

From: Jakub Narebski <[email-masked]>
Date: Thu, 16 Feb 2012 05:40:26 -0800 (PST)

Matthieu Moy <[email-masked]> writes:

> Changes since v2:
[...]
> - Shell style issues (thanks to Jakub)
[...]

> +verbose "Auto-detecting PDF viewer"
> +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"
> +	else
> +	    verbose_progress
> +	fi
> +    fi
> +done
> +verbose_done "$PDFVIEWER"

Eh?  I don't see shell style issues fixed (loop inside conditional
instead of vice-versa, "test ..." instead of "[ ... ]").

Nb. I think it would be good to put detecting PDF viewer in its own
function, don't you?

-- 
Jakub Narebski