From: Jakub Narebski <jnareb@gmail.com>
To: Matthieu Moy <Matthieu.Moy@imag.fr>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH v2] git-latexdiff: new command in contrib, to use latexdiff and Git
Date: Thu, 16 Feb 2012 01:15:27 -0800 (PST) [thread overview]
Message-ID: <m3hayrrvf9.fsf@localhost.localdomain> (raw)
In-Reply-To: <1329381560-15853-1-git-send-email-Matthieu.Moy@imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> +verbose "Auto-detecting PDF viewer"
> +for command in xdg-open evince okular xpdf acroread; do
> + if [ "$PDFVIEWER" = "" ]; then
> + if command -v "$command" >/dev/null 2>&1; then
> + PDFVIEWER="$command"
> + else
> + verbose_progress
> + fi
> + fi
> +done
> +verbose_done "$PDFVIEWER"
Why we autodetect PDF viewer unconditionally? Why we do not stop on
first detected viewer rather than last? Why not
+if [ "$PDFVIEWER" = "" ]; then
+ verbose "Auto-detecting PDF viewer"
+ for command in xdg-open evince okular xpdf acroread; do
+ if command -v "$command" >/dev/null 2>&1; then
+ PDFVIEWER=$command
+ break
+ else
+ verbose_progress
+ fi
+ done
+ verbose_done "$PDFVIEWER"
+fi
Nb. Documentation/CodingGuidelines says:
For shell scripts specifically (not exhaustive):
[...]
- We prefer "test" over "[ ... ]".
I know that 'contrib/' is more relaxed...
--
Jakub Narebski
next prev parent reply other threads:[~2012-02-16 9:15 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 15:49 [PATCH] git-latexdiff: new command in contrib, to use latexdiff and Git Matthieu Moy
2012-02-15 23:33 ` Tim Haga
2012-02-16 8:34 ` Matthieu Moy
2012-02-16 8:39 ` [PATCH v2] " Matthieu Moy
2012-02-16 9:15 ` Jakub Narebski [this message]
2012-02-16 19:24 ` David Aguilar
2012-02-16 8:47 ` [PATCH] " Steven Michalske
2012-02-16 8:59 ` Matthieu Moy
2012-02-16 12:36 ` [PATCH v3] " Matthieu Moy
2012-02-16 13:40 ` Jakub Narebski
2012-02-16 14:08 ` [PATCH v4] " Matthieu Moy
2012-02-16 14:15 ` [PATCH v3] " Matthieu Moy
2012-02-16 20:10 ` [PATCH] " Junio C Hamano
2012-02-16 21:04 ` Junio C Hamano
2012-02-17 8:10 ` Matthieu Moy
2012-02-17 13:31 ` Junio C Hamano
2012-02-17 14:19 ` Matthieu Moy
2012-02-17 17:25 ` Junio C Hamano
2012-02-17 18:40 ` Jakub Narebski
2012-02-20 8:50 ` Matthieu Moy
2012-02-20 9:05 ` Junio C Hamano
2012-02-20 12:00 ` Matthieu Moy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3hayrrvf9.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=Matthieu.Moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).