diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-12 00:29:36 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-12 00:29:36 +0800 |
commit | 789226bf5a815a04494a7fa5b6f4fbace73f3d70 (patch) | |
tree | ee55c9eade8d7193cd564095ac738ebccbc9dd2f | |
parent | 49a4cfc15f198417d48187238a2112d3f3cf8467 (diff) | |
download | atoolbox-789226bf5a815a04494a7fa5b6f4fbace73f3d70.tar.bz2 |
astro/ds9saveimg.sh: Tweak delays to be more robust (2)
-rwxr-xr-x | astro/ds9saveimg.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/astro/ds9saveimg.sh b/astro/ds9saveimg.sh index a83a80a..2b6787c 100755 --- a/astro/ds9saveimg.sh +++ b/astro/ds9saveimg.sh @@ -40,9 +40,14 @@ while [ ${retry} -ne 0 ]; do retry=$? done -# Bring the window to the front and snapshot to an image file -wmctrl -a ${TITLE} -xpaset -p ${TITLE} saveimage png ${IMG} +retry=1 +while [ ${retry} -ne 0 ]; do + # Bring the window to the front and snapshot to an image file + wmctrl -a ${TITLE} && + xpaset -p ${TITLE} saveimage png ${IMG} + retry=$? + [ ${retry} -ne 0 ] && sleep 1 +done echo "${TITLE}: ${FITS} + ${REG} => ${IMG}" #echo 'paused ...' && read _ |