From 21cd4f0dd359662b8a3978b6eeb39344fa1321e2 Mon Sep 17 00:00:00 2001 From: Damien Robert Date: Thu, 19 Dec 2013 16:47:37 +0100 Subject: [PATCH] Expand the array $latexdiffopt In bash (unlike zsh), using $array only expand to the first element of the array. To expand to the whole array, we have to use ${array[@]}. Since we did not expand $latexdiffopt, this meant that only the last option would be passed to latexdiff. Now we can pass several options (which was the point of using an array in the implementation in the first place). Signed-off-by: Damien Robert --- git-latexdiff | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/git-latexdiff b/git-latexdiff index e6fa2aa..e9141ab 100755 --- a/git-latexdiff +++ b/git-latexdiff @@ -243,7 +243,7 @@ while test $# -ne 0; do exit 1 fi else - latexdiffopt=($1 $latexdiffopt) + latexdiffopt+=($1) fi ;; *) @@ -409,9 +409,9 @@ do verbose_done done -verbose "Running latexdiff $latexdiffopt --flatten old/$main new/$main > ./diff.tex" +verbose "Running latexdiff ${latexdiffopt[@]} --flatten old/$main new/$main > ./diff.tex" -latexdiff $latexdiffopt --flatten old/"$main" new/"$main" > diff.tex || die "latexdiff failed" +latexdiff ${latexdiffopt[@]} --flatten old/"$main" new/"$main" > diff.tex || die "latexdiff failed" verbose "mv ./diff.tex new/$main"