From 18e2c17ab48752e543108af7bd19880782c5c663 Mon Sep 17 00:00:00 2001 From: Andrew Weaver Date: Fri, 5 May 2017 08:37:50 -0700 Subject: [PATCH] Script to open ffmprovisr when installed via homebrew (#181) - script for opening ffmprovisr from terminal --- scripts/ffmprovisr | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/ffmprovisr diff --git a/scripts/ffmprovisr b/scripts/ffmprovisr new file mode 100755 index 0000000..f91dff2 --- /dev/null +++ b/scripts/ffmprovisr @@ -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