8 Commits

Author SHA1 Message Date
Xu Cheng
2d84fc56fe update-bash: improve reset_on_interrupt
* make sure exit after reset.
* more wide guardian range. We should trap reset_on_interrupt as soon as
  we are about to change any files.
* check INITIAL_BRANCH against UPSTREAM_BRANCH
2016-01-21 21:14:55 +08:00
Xu Cheng
fafe8f0f53 update: implement rename_taps_dir_if_necessary in bash
rename_taps_dir_if_necessary must be performed before actual update.
Otherwise, it will report that `HOMEBREW_UPDAET_BEFORE<REPO_VAR>` is
unset.
2016-01-21 21:14:55 +08:00
Xu Cheng
ca59d6fbee update: improve repo_var
* use HOMEBREW_REPOSITORY instead of HOMEBREW_PREFIX
* better performance:
  * update-bash: avoid shellout
  * update-report: use strip_prefix and tr
* more robust:
  * explicitly handle the case when repo is HOMEBREW_REPOSITORY to avoid
    to handle the trailing backslash.
  * handle both lower case and upper case when stripping non alpha and
    digital characters.
2016-01-21 21:14:55 +08:00
Xu Cheng
9cd2658073 update-bash: avoid shellout for stripping prefix 2016-01-21 21:14:55 +08:00
Xu Cheng
83e1373376 update-bash: use odie and chdir from bin/brew 2016-01-21 21:14:55 +08:00
Xu Cheng
bc78f81032 update-bash: always use [[ 2016-01-21 21:14:55 +08:00
Xu Cheng
bb5cf70a02 update-bash: fix incorrect argument parsing 2016-01-21 21:14:55 +08:00
Mike McQuaid
99234f0256 Add new update-bash command for testing.
This will become the default updater at a later point in the future.
2016-01-17 19:48:02 +00:00