On Sat, Mar 9, 2019, at 4:24 PM, Mike wrote:
> the patch should be:

     $cmd || true
else
-    $cmd "$file" || true
+    $cmd "$file" $2
fi

There is a start page param after the file:

usage: /usr/lib/mupdf/mupdf-x11 [options] file.pdf [page]


- the proposed 'exec' leaves a tmp-file in /tmp !

(- I see no reason for the 'true'?)
> 


The script was using 'exec' and reads from a file descriptor but I changed it 
to current approach in this commit 
https://salsa.debian.org/koster/mupdf/commit/7e6cc9123f8b619799cfe1de4e765b22606c373a

I think reading from '/dev/fd/3' is not portable and I don't know if there is a 
way to reliably get a unused file descriptor.

I'll upload a version to fix the [page] options.

If anyone has idea how to improve the script please let me know!

Kanru

Reply via email to