aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-05-21 02:46:18 +0100
committerMax Howell2009-05-21 02:46:18 +0100
commit86df92e94fb757a40709cbd173d2b46683bcfeb6 (patch)
tree3eb12d57175938456fedfd95c9478e72088e0d85
parentbab81f6d00ae1298c33162475f2aebb04b0b1c66 (diff)
downloadbrew-86df92e94fb757a40709cbd173d2b46683bcfeb6.tar.bz2
brew ln works with relative paths
-rwxr-xr-xCellar/homebrew/brew8
1 files changed, 4 insertions, 4 deletions
diff --git a/Cellar/homebrew/brew b/Cellar/homebrew/brew
index ea407af59..b34c2d6fa 100755
--- a/Cellar/homebrew/brew
+++ b/Cellar/homebrew/brew
@@ -17,12 +17,12 @@ case ARGV[0]
#TODO check is under +/ with name AND version
#TODO you should mkdirs as you find them and symlink files otherwise
#TODO consider using hardlinks
-
- Find.find ARGV[1] do |from|
+
+ target=Pathname.new(ARGV[1]).realpath
+ target.find do |from|
next if from == ARGV[1] #rubysucks
- from=Pathname.new from
- to=$root+from.relative_path_from(Pathname.new(ARGV[1]))
+ to=$root+from.relative_path_from(target)
if from.directory?
to.mkpath unless to.exist?