diff options
| author | Adam Vandenberg | 2009-07-28 01:44:19 -0700 |
|---|---|---|
| committer | Max Howell | 2009-08-02 01:25:01 +0100 |
| commit | 1333e910cf80c4b25262b76b08f9a43e083394e7 (patch) | |
| tree | f644cb091faee66f37b90c0700b1f0129e5adcee | |
| parent | 58fe4cc2bf709a0603e441166c9b23bd70851b3e (diff) | |
| download | brew-1333e910cf80c4b25262b76b08f9a43e083394e7.tar.bz2 | |
A script to symlink Homebrew into /usr/local
This is a developer utility, to allow you to keep your git clone in
eg. your home directory, but still have Homebrew installed to
/usr/local.
It is an optional utility having the whole checkout at /usr/local
is the default and recommended solution.
| -rwxr-xr-x | Library/Contributions/selflink.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Library/Contributions/selflink.sh b/Library/Contributions/selflink.sh new file mode 100755 index 000000000..285af4f86 --- /dev/null +++ b/Library/Contributions/selflink.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +mode=$1 +if [[ -z $mode ]]; then + mode="install" +fi + +source_base=`pwd` + +if [[ $mode == install ]]; then + ln -s "$source_base/bin/brew" "/usr/local/bin/brew"; + ln -s "$source_base/Library" "/usr/local/Library"; + ln -s "$source_base/Cellar" "/usr/local/Cellar"; +elif [[ $mode == undo ]]; then + rm "/usr/local/bin/brew" + rm "/usr/local/Library" + rm "/usr/local/Cellar" +else + echo "Unknown command: $mode"; + echo "\tselflink.sh [install] >> symlinks to /usr/local" + echo "\tselflink.sh undo >> removes symlinks from /usr/local" +fi |
