From d5241043f3a88d388d195621f45de9ce05fb703b Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 21 May 2009 01:21:20 +0100 Subject: [PATCH] Use relative and not absolute symlinks This refers to the 'brew ln' command --- Cellar/homebrew/brew | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cellar/homebrew/brew b/Cellar/homebrew/brew index 692cac5a01..ea407af59b 100755 --- a/Cellar/homebrew/brew +++ b/Cellar/homebrew/brew @@ -22,13 +22,13 @@ case ARGV[0] next if from == ARGV[1] #rubysucks from=Pathname.new from - relto=from.relative_path_from(Pathname.new(ARGV[1])) - to=$root+relto; + to=$root+from.relative_path_from(Pathname.new(ARGV[1])) if from.directory? - to.mkpath unless to.exist? and relto.to_s.include? '/' + to.mkpath unless to.exist? elsif from.file? - to.make_symlink from + tod=to.dirname + Dir.chdir(tod) { `ln -s #{from.relative_path_from tod}` } end end