diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-05 01:57:27 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-06-05 01:59:05 +0200 |
commit | e6c3d682542b5544f15db0b58ff2b018c96dbf5d (patch) | |
tree | 27d07ab8e03201bce2ab4e5ffd423512e8fc1e45 | |
parent | 3b88bd8a5e4d40f7f938d002ac10dc981ee43a80 (diff) | |
download | xutil-e6c3d682542b5544f15db0b58ff2b018c96dbf5d.tar.gz |
Add 'wpdf' utility
-rwxr-xr-x | wpdf | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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 |