Browse Source

don't substitute @GIT_LATEXDIFF_VERSION@ where it should not

The previous version was substituting both the initialization of
git_latexdiff_version and the test later in git_latexdiff_version,
resulting in a 'if' that could not fail.

Fixes #7.
master
Matthieu Moy 9 years ago
parent
commit
e6ff2bda8b
  1. 4
      git-latexdiff

4
git-latexdiff

@ -49,10 +49,12 @@ set -o noclobber
# But we protect ourselves from such a user mistake nevertheless. # But we protect ourselves from such a user mistake nevertheless.
unset CDPATH unset CDPATH
# @GIT_LATEXDIFF_VERSION@ is substituted by the install script here,
# but not within git_latexdiff_compute_version().
git_latexdiff_version='@GIT_LATEXDIFF_VERSION@' git_latexdiff_version='@GIT_LATEXDIFF_VERSION@'
git_latexdiff_compute_version () { git_latexdiff_compute_version () {
if [ "$git_latexdiff_version" = '@GIT_LATEXDIFF_VERSION@' ]; then
if [ "$git_latexdiff_version" = '@GIT_LATEXDIFF''_VERSION@' ]; then
(cd "$(dirname "$0")" && git describe --tags HEAD 2>/dev/null || echo 'Unknown version') (cd "$(dirname "$0")" && git describe --tags HEAD 2>/dev/null || echo 'Unknown version')
else else
echo "$git_latexdiff_version" echo "$git_latexdiff_version"

Loading…
Cancel
Save