Skip to content

Instantly share code, notes, and snippets.

@ferventcoder
Created December 18, 2013 21:56
Show Gist options
  • Save ferventcoder/8030532 to your computer and use it in GitHub Desktop.
Save ferventcoder/8030532 to your computer and use it in GitHub Desktop.
gitex.mono
#!/bin/bash
# Get path of current script - http://stackoverflow.com/a/246128/18475
SCRIPTSOURCE="${BASH_SOURCE[0]}"
while [ -h "$SCRIPTSOURCE" ]; do # resolve $SCRIPTSOURCE until the file is no longer a symlink
DIR="$(cd -P "$( dirname "$SCRIPTSOURCE" )" && pwd)"
SCRIPTSOURCE="$(readlink "$SCRIPTSOURCE")"
[[ $SCRIPTSOURCE != /* ]] && SCRIPTSOURCE="$DIR/$SCRIPTSOURCE" # if $SCRIPTSOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
SCRIPTDIR="$(cd -P "$( dirname "$SCRIPTSOURCE" )" && pwd)"
mono "$SCRIPTDIR/GitExtensions.exe" "$@" &
@ferventcoder
Copy link
Author

ln -s /Applications/GitExtensions/gitex /usr/bin/gitex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment