update: rewrite origin to point to Homebrew org.
This commit is contained in:
parent
2afa1c3b86
commit
228a5a545a
@ -81,10 +81,15 @@ module Homebrew extend self
|
|||||||
if Dir['.git/*'].empty?
|
if Dir['.git/*'].empty?
|
||||||
safe_system "git init"
|
safe_system "git init"
|
||||||
safe_system "git config core.autocrlf false"
|
safe_system "git config core.autocrlf false"
|
||||||
safe_system "git remote add origin https://github.com/mxcl/homebrew.git"
|
safe_system "git remote add origin https://github.com/Homebrew/homebrew.git"
|
||||||
safe_system "git fetch origin"
|
safe_system "git fetch origin"
|
||||||
safe_system "git reset --hard origin/master"
|
safe_system "git reset --hard origin/master"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if `git remote show origin -n` =~ /Fetch URL: \S+mxcl\/homebrew/
|
||||||
|
safe_system "git remote set-url origin https://github.com/Homebrew/homebrew.git"
|
||||||
|
safe_system "git remote set-url --delete origin .*mxcl\/homebrew.*"
|
||||||
|
end
|
||||||
rescue Exception
|
rescue Exception
|
||||||
FileUtils.rm_rf ".git"
|
FileUtils.rm_rf ".git"
|
||||||
raise
|
raise
|
||||||
|
Loading…
x
Reference in New Issue
Block a user