mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2024-11-09 23:17:24 +01:00
don't try to find the default browser on macOS (#456)
This commit is contained in:
parent
bf93a20da8
commit
0d27ffa5d1
@ -4,17 +4,12 @@
|
|||||||
# connected to the Web, and the local version otherwise.
|
# connected to the Web, and the local version otherwise.
|
||||||
|
|
||||||
if [[ "$(uname -s)" = "Darwin" ]] ; then
|
if [[ "$(uname -s)" = "Darwin" ]] ; then
|
||||||
default_browser=$(plutil -convert json ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist -r -o - | grep https -b1 | tail -n1 | cut -d'"' -f4)
|
|
||||||
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
|
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
|
||||||
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
|
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
|
||||||
else
|
else
|
||||||
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
|
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
|
||||||
fi
|
fi
|
||||||
if [[ -n "${default_browser}" ]] ; then
|
open "${ffmprovisr_path}"
|
||||||
open -b "${default_browser}" "${ffmprovisr_path}"
|
|
||||||
else
|
|
||||||
open "${ffmprovisr_path}"
|
|
||||||
fi
|
|
||||||
elif [[ "$(uname -s)" = "Linux" ]] ; then
|
elif [[ "$(uname -s)" = "Linux" ]] ; then
|
||||||
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
|
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
|
||||||
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
|
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
|
||||||
|
Loading…
Reference in New Issue
Block a user