From e6c3d682542b5544f15db0b58ff2b018c96dbf5d Mon Sep 17 00:00:00 2001 From: "John Ankarstr\\xf6m" Date: Sat, 5 Jun 2021 01:57:27 +0200 Subject: Add 'wpdf' utility --- wpdf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 wpdf diff --git a/wpdf b/wpdf new file mode 100755 index 0000000..3e0e1aa --- /dev/null +++ b/wpdf @@ -0,0 +1,16 @@ +#!/bin/sh + +# wpdf -- view, watch and remake pdf + +IFS=' +' + +[ -z "$*" ] && { echo usage: $0 source-file ... 1>&2; exit 1; } + +for source in "$@"; do + xpdf -remote wpdf-$source ${source%.*}.pdf & +done +sleep 1 +watch -i "$@" | while read source; do + make ${source%.*}.pdf && xpdf -remote wpdf-$source -reload +done -- cgit v1.2.3