aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/update.sh
diff options
context:
space:
mode:
authorXu Cheng2016-04-03 18:34:17 +0800
committerXu Cheng2016-04-03 18:34:17 +0800
commitedf000e4cd30c3626ccc28c52ed32f2d84a200dd (patch)
tree9825fa984f2aac3245be456dbdcfa73fbc2a8205 /Library/Homebrew/cmd/update.sh
parente70a3552d3faddd0afd2535a03c31b8c50be901a (diff)
downloadbrew-edf000e4cd30c3626ccc28c52ed32f2d84a200dd.tar.bz2
Core/formula separation Part 2(b)0.9.9
* move shell completion scripts to where can be auto picked up Let's use switching new remote as opportunity to put shell completion scripts to where they should be and avoid git conflict during the process. * add Library/Formula and Library/Aliases symlinks Formulae and Aliases has been relocated to homebrew/core tap. The symlinks are pointed to new location to keep backward compatibility. * remove formula_renames and tap_migrations They have been replaced by the json files in the core tap. * update: set new remote * bump Homebrew version to 0.9.9
Diffstat (limited to 'Library/Homebrew/cmd/update.sh')
-rw-r--r--Library/Homebrew/cmd/update.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index d0da09575..49dcb5038 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -7,26 +7,26 @@ git() {
}
git_init_if_necessary() {
+ if [[ -n "$HOMEBREW_OSX" ]]
+ then
+ OFFICIAL_REMOTE="https://github.com/Homebrew/brew.git"
+ else
+ OFFICIAL_REMOTE="https://github.com/Linuxbrew/brew.git"
+ fi
+
if [[ ! -d ".git" ]]
then
set -e
trap '{ rm -rf .git; exit 1; }' EXIT
git init
git config --bool core.autocrlf false
- git config remote.origin.url https://github.com/Homebrew/homebrew.git
+ git config remote.origin.url "$OFFICIAL_REMOTE"
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch --force --depth=1 origin refs/heads/master:refs/remotes/origin/master
git reset --hard origin/master
SKIP_FETCH_HOMEBREW_REPOSITORY=1
set +e
trap - EXIT
- return
- fi
-
- if [[ "$(git remote show origin -n)" = *"mxcl/homebrew"* ]]
- then
- git remote set-url origin https://github.com/Homebrew/homebrew.git &&
- git remote set-url --delete origin ".*mxcl\/homebrew.*"
fi
}