fix: restrict supported screenshot tools

This commit is contained in:
Ben Grande 2024-03-20 10:29:44 +01:00
parent 276109006a
commit 004cb73dbf
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56

View File

@ -126,6 +126,14 @@ if test -n "${dialog_cmd_wanted}"; then
echo "[ERROR] ${msg}"
exit 1
fi
case "${dialog_cmd_wanted}" in
kdialog|zenity);;
*)
msg="wanted dialog program unsupported: ${dialog_cmd_wanted}"
echo "[ERROR] ${msg}"
exit 1
;;
esac
dialog_cmd="${dialog_cmd_wanted}"
else
if command -v kdialog >/dev/null; then
@ -150,6 +158,14 @@ if test -n "${screenshot_cmd_wanted}"; then
esac
exit 1
fi
case "${screenshot_cmd_wanted}" in
kdialog|zenity);;
*)
msg="wanted screenshot program unsupported: ${screenshot_cmd_wanted}"
echo "[ERROR] ${msg}"
exit 1
;;
esac
screenshot_cmd="${screenshot_cmd_wanted}"
else
if command -v spectacle >/dev/null; then