mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
brew ln works with relative paths
This commit is contained in:
parent
bab81f6d00
commit
86df92e94f
@ -18,11 +18,11 @@ case ARGV[0]
|
||||
#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?
|
||||
|
Loading…
x
Reference in New Issue
Block a user