From 86df92e94fb757a40709cbd173d2b46683bcfeb6 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 21 May 2009 02:46:18 +0100 Subject: brew ln works with relative paths --- Cellar/homebrew/brew | 8 ++++---- 1 file 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? -- cgit v1.2.3