check if connected to the web

This commit is contained in:
Reto Kromer 2017-08-25 15:15:04 +02:00 committed by GitHub
parent 23148d4721
commit b598ed1040

View File

@ -7,7 +7,7 @@ if [[ "$(uname -s)" = "Darwin" ]] ; then
if [ -d /usr/local/Cellar/ffmprovisr ] ; then
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi
if [ -z "${ffmprovisr_path}" ] ; then
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
fi
if [ -n "${default_browser}" ] ; then
@ -19,7 +19,7 @@ elif [[ "$(uname -s)" = "Linux" ]] ; then
if [ -d ~/.linuxbrew/Cellar/ffmprovisr ] ; then
ffmprovisr_path=$(find ~/.linuxbrew/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi
if [ -z "${ffmprovisr_path}" ] ; then
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
fi
xdg-open "${ffmprovisr_path}"