Skip to content

Instantly share code, notes, and snippets.

@aereal
Created March 2, 2014 16:31
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 aereal/9309126 to your computer and use it in GitHub Desktop.
Save aereal/9309126 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -ue
if [[ $# -le 0 ]]; then
cat <<ERROR 1>&2
Usage:
$(basename $0) TAP_OWNER/TAP_REPO
ERROR
exit 1
fi
tap_name="$(echo $1 | sed -e 's/\//-/g')"
tap_directory=$(brew --prefix)/Library/Taps/$tap_name
if [[ ! -d $tap_directory ]]; then
echo "Tap: ${tap_name} is not found" 1>&2
exit 1
fi
echo $tap_directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment