Shell Script to Open Lua Documentation In A Browser
#!/bin/sh
LUADOC=/usr/local/share/doc/lua54/readme.html
open_docs() {
for i in opera chromium firefox
do
if command -v $i >/dev/null 2>&1; then
exec $i $LUADOC >/dev/null 2>&1 &
FOUND=true
fi
done
if [ -z "$FOUND" ]; then
echo "No suitable browser was found"
fi
}
open_docs
Comments