rwxrob-dot/scripts/lynx
2024-06-14 01:51:19 -04:00

28 lines
708 B
Bash
Executable File

#!/usr/bin/env bash
# be sure to install the ca-certificates package
# see ../lynx/README.md for configs
lynxpath=/usr/bin/lynx
[[ ! -x $lynxpath ]] && lynxpath=/usr/local/bin/lynx
[[ ! -x $lynxpath ]] && lynxpath=/opt/homebrew/bin/lynx
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" "$@"