From e6ff2bda8b565cdaedb5e52f6db9026c25cb0ad3 Mon Sep 17 00:00:00 2001 From: Matthieu Moy Date: Tue, 26 Jan 2016 14:42:12 +0100 Subject: [PATCH] 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. --- git-latexdiff | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-latexdiff b/git-latexdiff index 6b3e061..8700935 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -49,10 +49,12 @@ set -o noclobber # But we protect ourselves from such a user mistake nevertheless. 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_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') else echo "$git_latexdiff_version"