Browse Source

Merge branch '31_view_not_working_when_output_is_specified' into 'master'

#31 fixed viewing file when output file is specified

See merge request git-latexdiff/git-latexdiff!8
master
Matthieu Moy 7 years ago
parent
commit
ef53cddc76
  1. 5
      git-latexdiff

5
git-latexdiff

@ -718,7 +718,8 @@ fi
if test -n "$output" ; then if test -n "$output" ; then
abs_pdffile="$PWD/$pdffile" abs_pdffile="$PWD/$pdffile"
(cd "$initial_dir" && mv "$abs_pdffile" "$output") (cd "$initial_dir" && mv "$abs_pdffile" "$output")
echo "Output written on $output"
pdffile="$output"
echo "Output written on $pdffile"
elif [ -f "$pdffile" ]; then elif [ -f "$pdffile" ]; then
new_pdffile="$tmpdir"/"$pdffile" new_pdffile="$tmpdir"/"$pdffile"
mv "$pdffile" "$new_pdffile" mv "$pdffile" "$new_pdffile"
@ -728,7 +729,7 @@ fi
# Change directory so nothing will keep us from cleaning # Change directory so nothing will keep us from cleaning
cd "$initial_dir" cd "$initial_dir"
if test "$view" = 1 || test "$view" = maybe && test -z "$output" ; then
if test "$view" = 1 || ( test "$view" = maybe && test -z "$output" ) ; then
"$PDFVIEWER" "$pdffile" "$PDFVIEWER" "$pdffile"
fi fi

Loading…
Cancel
Save