Commit 7e6cc912 authored by Kan-Ru Chen's avatar Kan-Ru Chen

debian/mupdf.sh: Do not read from a file descriptor

Closes: #893115, #893862
parent 701b7dc1
......@@ -35,14 +35,14 @@ test -f "$1" && file="$1" ||
tmp=$(tempfile -s .pdf)
case "$file" in
*.gz|*.Z) zcat -- "$file" > "$tmp" && exec 3< "$tmp" && file="/dev/fd/3";;
*.xz) xzcat -- "$file" > "$tmp" && exec 3< "$tmp" && file="/dev/fd/3";;
*.bz2) bzcat -- "$file" > "$tmp" && exec 3< "$tmp" && file="/dev/fd/3";;
*.gz|*.Z) zcat -- "$file" > "$tmp" && exec 3< "$tmp" && file="$tmp";;
*.xz) xzcat -- "$file" > "$tmp" && exec 3< "$tmp" && file="$tmp";;
*.bz2) bzcat -- "$file" > "$tmp" && exec 3< "$tmp" && file="$tmp";;
esac
rm -f "$tmp"
trap 'rm -f "$tmp"' EXIT
if [ "$file" = "" ]; then
exec $cmd || true
$cmd || true
else
exec $cmd "$file" || true
$cmd "$file" || true
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment