muxsa-kvm2png: adjust for Debian Bookworm
This commit is contained in:
parent
f6df2d62c1
commit
073c5b8cd8
@ -62,7 +62,7 @@ echo
|
||||
|
||||
############################################################################
|
||||
|
||||
TMP_FILE="$(mktemp -t muxsa-kvm2png-XXXXXXXXXX.ppm)"
|
||||
TMP_FILE="$(mktemp -t muxsa-kvm2png-XXXXXXXXXX.png)"
|
||||
if [ ! -w "${TMP_FILE}" ] ; then
|
||||
echo "Error: cannot create tmp_file. abort."
|
||||
exit 1
|
||||
@ -193,12 +193,26 @@ while true ; do
|
||||
echo "Outfile ${OUTFILE} exists and overwriting not allowed. abort."
|
||||
exit 1
|
||||
fi
|
||||
echo "Converting and saving screenshot to ${OUTFILE}"
|
||||
pnmtopng -force "${TMP_FILE}" > "$OUTFILE"
|
||||
|
||||
TMPFORMAT="$(identify -format "%m" "${TMP_FILE}")"
|
||||
case "${TMPFORMAT}" in
|
||||
PNG)
|
||||
echo -n "copy "
|
||||
cp -v "${TMP_FILE}" "${OUTFILE}"
|
||||
;;
|
||||
PPM)
|
||||
echo "pnmtopng -force \"${TMP_FILE}\" > \"${OUTFILE}\""
|
||||
pnmtopng -force "${TMP_FILE}" > "${OUTFILE}"
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo "Converting and saving screenshot failed. abort."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "File ${TMP_FILE} has unknown format ${TMPFORMAT}. abort."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${MUXSA_KVM2PNG_MD5_LAST_SLIDE}" ] ; then
|
||||
if md5sum "${OUTFILE}" | \
|
||||
|
Loading…
Reference in New Issue
Block a user