mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
fix: unify screenshot tool existence logic
Fixes: https://github.com/ben-grande/qusal/issues/51
This commit is contained in:
parent
444672e999
commit
efcf8c7723
@ -141,12 +141,11 @@ else
|
||||
elif command -v zenity >/dev/null; then
|
||||
dialog_cmd="zenity"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "${dialog_cmd}"; then
|
||||
echo "[ERROR] dialog programs not found: zenity kdialog"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "${screenshot_cmd_wanted}"; then
|
||||
if ! command -v "${screenshot_cmd_wanted}" >/dev/null; then
|
||||
@ -156,10 +155,16 @@ if test -n "${screenshot_cmd_wanted}"; then
|
||||
zenity) zenity --info --text "${msg}";;
|
||||
kdialog) kdialog --msgbox "${msg}";;
|
||||
esac
|
||||
exit 1
|
||||
fi
|
||||
case "${screenshot_cmd_wanted}" in
|
||||
maim|scrot|spectacle|xfce4-screenshooter);;
|
||||
*)
|
||||
msg="wanted screenshot program unsupported: ${screenshot_cmd_wanted}"
|
||||
echo "[ERROR] ${msg}"
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
screenshot_cmd="${screenshot_cmd_wanted}"
|
||||
else
|
||||
if command -v maim >/dev/null; then
|
||||
|
Loading…
Reference in New Issue
Block a user