From 7cf56bef3c00a77e2432fbd499d79f06ff768752 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 19 Oct 2008 22:56:04 +0100 Subject: [PATCH] bugfixes to view-cyclicly --- view-cyclicly | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/view-cyclicly b/view-cyclicly index 34e7087..01c0c4c 100755 --- a/view-cyclicly +++ b/view-cyclicly @@ -13,11 +13,16 @@ for f in "$@"; do g="${g//"/"/_:}" alt="${alt}_,$g" done +tmp=".tmp$alt" ln -sf -- "$1" "$alt" + "$viewer" "$alt" & +trap "kill $!" 0 while sleep 1.0; do justhad="$1"; shift; set -- "$@" "$justhad" - ln -sf -- "$1" "$alt" + ln -sf -- "$1" "$tmp" + mv -f "$tmp" "$alt" + echo "==== $1 ====" done -- 2.30.2