Skip to content

Instantly share code, notes, and snippets.

@jezdez
Created July 1, 2009 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jezdez/138765 to your computer and use it in GitHub Desktop.
Save jezdez/138765 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Shell script to open files or folders with Murky.app
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic.
# The original version is the fault of Benji Fisher, 16 May 2005 (with
# modifications by Nico Weber and Bjorn Winckler, Aug 13 2007). Originally
# released as the "mvim" shell script of MacVim.app.
# First, check "All the Usual Suspects" for the location of the Murky.app
# bundle. You can short-circuit this by setting the MURKY_APP_DIR environment
# variable or by un-commenting and editing the following line:
# MURKY_APP_DIR=/Applications
if [ -z "$MURKY_APP_DIR" ]
then
myDir="`dirname "$0"`"
myAppDir="$myDir/../Applications"
for i in ~/Applications $myDir $myAppDir /Applications /Applications/Utilities; do
if [ -x "$i/Murky.app" ]; then
MURKY_APP_DIR="$i"
break
fi
done
fi
if [ -z "$MURKY_APP_DIR" ]
then
echo "Sorry, cannot find Murky.app. Try setting the MURKY_APP_DIR environment variable to the directory containing Murky.app."
exit 1
fi
binary="$MURKY_APP_DIR/Murky.app"
if [ "$1" = "" ]; then
repodir="."
else
repodir=${1:+"$@"}
fi
if [ "$repodir" ]; then
open -a "$binary" "$repodir"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment