Script to open ffmprovisr when installed via homebrew (#181)

- script for opening ffmprovisr from terminal
This commit is contained in:
Andrew Weaver 2017-05-05 08:37:50 -07:00 committed by Reto Kromer
parent e4309d6664
commit 18e2c17ab4

19
scripts/ffmprovisr Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
if [[ $OSTYPE = 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
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
fi
open "${ffmprovisr_path}"
elif [[ $OSTYPE = linux-gnu ]] ; 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
ffmprovisr_path='https://amiaopensource.github.io/ffmprovisr/'
fi
xdg-open "${ffmprovisr_path}"
fi