From 775c4eedd7f6342ccfe7fe802a5935cb78ab050d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 12 Feb 2016 13:25:37 +0000 Subject: [PATCH] Promote update-bash to the default updater. Also, rename the existing updater to `update-ruby` to allow using as a fallback. It will eventually be removed. Closes Homebrew/homebrew#49109. Signed-off-by: Mike McQuaid --- Library/Homebrew/cmd/{update.rb => update-ruby.rb} | 2 +- Library/Homebrew/cmd/{update-bash.sh => update.sh} | 2 +- Library/Homebrew/test/test_updater.rb | 2 +- bin/brew | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename Library/Homebrew/cmd/{update.rb => update-ruby.rb} (99%) rename Library/Homebrew/cmd/{update-bash.sh => update.sh} (99%) diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update-ruby.rb similarity index 99% rename from Library/Homebrew/cmd/update.rb rename to Library/Homebrew/cmd/update-ruby.rb index f93224c8d0..98294bca84 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update-ruby.rb @@ -6,7 +6,7 @@ require "formulary" require "descriptions" module Homebrew - def update + def update_ruby unless ARGV.named.empty? abort <<-EOS.undent This command updates brew itself, and does not take formula names. diff --git a/Library/Homebrew/cmd/update-bash.sh b/Library/Homebrew/cmd/update.sh similarity index 99% rename from Library/Homebrew/cmd/update-bash.sh rename to Library/Homebrew/cmd/update.sh index 4a0a2699c5..d9226cfb9a 100644 --- a/Library/Homebrew/cmd/update-bash.sh +++ b/Library/Homebrew/cmd/update.sh @@ -250,7 +250,7 @@ pull() { trap - SIGINT } -homebrew-update-bash() { +homebrew-update() { local option local DIR local UPSTREAM_BRANCH diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb index 16efdaa1d4..f84048b524 100644 --- a/Library/Homebrew/test/test_updater.rb +++ b/Library/Homebrew/test/test_updater.rb @@ -1,5 +1,5 @@ require "testing_env" -require "cmd/update" +require "cmd/update-ruby" require "formula_versions" require "yaml" diff --git a/bin/brew b/bin/brew index 320456c2e3..732f7e03db 100755 --- a/bin/brew +++ b/bin/brew @@ -144,7 +144,7 @@ fi if [[ "$(id -u)" = "0" && "$(/usr/bin/stat -f%u "$HOMEBREW_BREW_FILE")" != "0" ]] then case "$HOMEBREW_COMMAND" in - instal|install|reinstall|postinstall|ln|link|pin|update|update-bash|upgrade|create|migrate|tap|switch) + instal|install|reinstall|postinstall|ln|link|pin|update|update-ruby|upgrade|create|migrate|tap|switch) odie <