aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2009-12-04 22:33:09 -0800
committerMax Howell2009-12-12 16:24:14 +0000
commit4731add213b5bc4b1670b779d2bf9c3952377adb (patch)
treed7cd253ee8f30fa590bea5358f0e7cc9c3ea413a /Library
parent4ce19ae2d727fd9b8ff8490c07bc45e2a191f514 (diff)
downloadbrew-4731add213b5bc4b1670b779d2bf9c3952377adb.tar.bz2
Fix selflink script.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/selflink.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/Library/Contributions/selflink.sh b/Library/Contributions/selflink.sh
index c08aa739f..7a33c2c79 100755
--- a/Library/Contributions/selflink.sh
+++ b/Library/Contributions/selflink.sh
@@ -17,30 +17,25 @@ source_base=`pwd`
if [[ $mode == install ]]; then
# Ensure that the Cellar exists -- otherwise Homebrew breaks
if [[ ! -e "$source_base/Cellar" ]] ; then
- mkdir -p "$source_base/Cellar"
+ mkdir -p "$install_base/Cellar"
fi
- if [[ ! -e "$install_base/bin" ]] ; then
+ if [[ ! -e "$source_base/bin" ]] ; then
mkdir -p $install_base/bin
fi
ln -s "$source_base/bin/brew" "$install_base/bin/brew";
- ln -s "$source_base/Library" "$install_base/Library";
ln -s "$source_base/Cellar" "$install_base/Cellar";
elif [[ $mode == undo ]]; then
if [[ -h "$install_base/bin/brew" ]] ; then
rm "$install_base/bin/brew"
fi
- if [[ -h "$install_base/Library" ]] ; then
- rm "$install_base/Library"
- fi
-
if [[ -h "$install_base/Cellar" ]] ; then
rm "$install_base/Cellar"
fi
else
echo "Unknown command: $mode";
- echo "\tselflink.sh [install] >> symlinks to $install_base"
- echo "\tselflink.sh undo >> removes symlinks from $install_base"
+ echo " selflink.sh [install] >> symlinks to $install_base"
+ echo " selflink.sh undo >> removes symlinks from $install_base"
fi