print debug data to stderr
This commit is contained in:
parent
c8aba752da
commit
2cc10d34ae
@ -13,13 +13,13 @@ stream_config(){
|
|||||||
|
|
||||||
# check if usage is valid
|
# check if usage is valid
|
||||||
if ! test -n "$1"; then
|
if ! test -n "$1"; then
|
||||||
printf "Usage: %s [resource...]\n" "$argv0"
|
printf "Usage: %s [resource...]\n" "$argv0" 1>&2
|
||||||
exit 64 # sysexits(3) EX_USAGE
|
exit 64 # sysexits(3) EX_USAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check if we have curl(1)
|
# check if we have curl(1)
|
||||||
if ! command -v curl >/dev/null 2>&1; then
|
if ! command -v curl >/dev/null 2>&1; then
|
||||||
printf "%s: Missing dependency: curl(1)\n" "$argv0"
|
printf "%s: Missing dependency: curl(1)\n" "$argv0" 1>&2
|
||||||
exit 71 # sysexits(3) EX_OSERR
|
exit 71 # sysexits(3) EX_OSERR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ if ! test -n "$BROWSER"; then
|
|||||||
%s: \$BROWSER not filled.
|
%s: \$BROWSER not filled.
|
||||||
Please place the path to your default browser's executable in
|
Please place the path to your default browser's executable in
|
||||||
/etc/xdg-sanity/xdg-sanity.conf
|
/etc/xdg-sanity/xdg-sanity.conf
|
||||||
" "$argv0"
|
" "$argv0" 1>&2
|
||||||
exit 71 # sysexits(3) EX_OSERR
|
exit 71 # sysexits(3) EX_OSERR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -67,10 +67,10 @@ while test -n "$1"; do
|
|||||||
if [ "$MIME" = "text/html" ]; then
|
if [ "$MIME" = "text/html" ]; then
|
||||||
"$BROWSER" "$argv1"
|
"$BROWSER" "$argv1"
|
||||||
elif ! handlr launch "$MIME" -- "$argv1"; then
|
elif ! handlr launch "$MIME" -- "$argv1"; then
|
||||||
printf "%s: %s: handlr(1) failed: " "$argv0" "$argv1"
|
printf "%s: %s: handlr(1) failed: " "$argv0" "$argv1" 1>&2
|
||||||
[ "$(command -v handlr)" = "false" ] \
|
[ "$(command -v handlr)" = "false" ] \
|
||||||
&& printf "'handlr' program not found\n" \
|
&& printf "'handlr' program not found\n" 1>&2 \
|
||||||
|| printf "non-zero exit status\n"
|
|| printf "non-zero exit status\n" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
shift
|
shift
|
||||||
|
Loading…
Reference in New Issue
Block a user