Skip to content

Commit

Permalink
don't try to find the default browser on macOS (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
retokromer authored Aug 13, 2021
1 parent bf93a20 commit 0d27ffa
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/ffmprovisr
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@
# connected to the Web, and the local version otherwise.

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
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
else
ffmprovisr_path=$(find /usr/local/Cellar/ffmprovisr -iname 'index.html' | sort -M | tail -n1)
fi
if [[ -n "${default_browser}" ]] ; then
open -b "${default_browser}" "${ffmprovisr_path}"
else
open "${ffmprovisr_path}"
fi
open "${ffmprovisr_path}"
elif [[ "$(uname -s)" = "Linux" ]] ; then
if ping -c 1 amiaopensource.github.io >/dev/null 2>&1 ; then
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
Expand Down

0 comments on commit 0d27ffa

Please sign in to comment.