diff options
-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 _ |