core-agent-linux/qubes-rpc/qubes.OpenURL
Marek Marczykowski-Górecki 9c839d789f
qubes-rpc: fix issues found by shellcheck
Most of them are missing quotes, `` -> $(), and -o/-a usage in
conditions. Also add few directives disabling checks where were too
verbose.
2017-09-30 04:45:31 +02:00

17 lines
195 B
Bash
Executable File

#!/bin/sh
read -r url
case "$url" in
http://*|\
https://*|\
ftp://*)
exec qubes-open "$url"
;;
*)
echo "Invalid URL" >&2
exit 1
;;
esac