rwxrob-dot/scripts/lynx

27 lines
652 B
Plaintext
Raw Normal View History

2022-02-11 03:43:17 +00:00
#!/usr/bin/env bash
2022-02-09 07:29:05 +00:00
# be sure to install the ca-certificates package
# see ../lynx/README.md for configs
lynxpath=/usr/bin/lynx
2022-02-11 03:28:18 +00:00
[[ ! -x $lynxpath ]] && lynxpath=/usr/local/bin/lynx
2022-02-09 08:32:47 +00:00
2022-02-09 07:29:05 +00:00
useragent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1 Lynx"
if [ -e "$HOME/.config/lynx/lynx.cfg" ];then
export LYNX_CFG="$HOME/.config/lynx/lynx.cfg"
fi
if [ -e "$HOME/.config/lynx/lynx.lss" ];then
export LYNX_LSS="$HOME/.config/lynx/lynx.lss"
fi
if [ ! -x "$lynxpath" ]; then
echo "Doesn't look like lynx is installed."
exit 1
fi
exec "$lynxpath" --useragent="$useragent" "$@"