Browse Source

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 <damien.olivier.robert+git@gmail.com>
master
Damien Robert 12 years ago
committed by Matthieu Moy
parent
commit
21cd4f0dd3
  1. 6
      git-latexdiff

6
git-latexdiff

@ -243,7 +243,7 @@ while test $# -ne 0; do
exit 1 exit 1
fi fi
else else
latexdiffopt=($1 $latexdiffopt)
latexdiffopt+=($1)
fi fi
;; ;;
*) *)
@ -409,9 +409,9 @@ do
verbose_done verbose_done
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" verbose "mv ./diff.tex new/$main"

Loading…
Cancel
Save