aboutsummaryrefslogtreecommitdiffstats
path: root/Library/brew.sh
AgeCommit message (Collapse)Author
2016-07-15brew.{rb,sh}: move to Library/Homebrew. (#506)Mike McQuaid
2016-07-15ENV: move to new paths. (#507)Mike McQuaid
Move some stuff formerly in `Library/ENV` around: - Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are all superenv wrappers and all symlinks to the same version. We never needed the "separate shims for separate versions" functionality and it just adds confusion. - Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more things under `Library/Homebrew` - Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually used by or related to superenv (or stdenv) in any way.
2016-07-12brew.sh: only setup/install Ruby when running Ruby.Mike McQuaid
2016-07-11brew.sh: new HOMEBREW_RUBY_PATH resolution logicXu Cheng
* Use vendor Ruby if it's present * Install vendor Ruby for system without Ruby 2.x
2016-07-11add vendor-install commandXu Cheng
2016-07-08brew.sh: enable autoupdate for Homebrew developers (#429)Mike McQuaid
Autoupdate has been working well for me/opt-in folks for a while so lets enable it for Homebrew developers to test before we enable it for everyone.
2016-07-07Autoupdate tweaks (#442)Mike McQuaid
* Don't infinitely recurse `brew update --preinstall`. This could happen when trying to `brew install git` inside `brew update --preinstall`. * update.sh: cache Git PATH. We don’t need to look it up from superenv every time; this is slow. * update.sh: print message before preinstall updates. * update.sh: verbose output fetch directory. This aids reading `brew update --verbose --debug` output. * update.sh: skip taps without formulae on preinstall. We don’t need to update them as we’re not invoking them. * update.sh: don't force update-report on developer preinstall. This is too slow.
2016-06-29brew.sh: rename 'chdir' to 'safe_cd'Martin Afanasjew
This is inspired by `safe_system` with basically the same implication (fail on error), making the name a lot less confusing and avoiding a clash with the `chdir` function previously defined in `bin/brew`. Closes #414. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-08brew.rb: Don't ask `xcrun` for output if no CLT is installed (#334)Elliot Saba
This avoids `xcrun` popups when installing Homebrew on a non-Xcode non-CLT machine.
2016-05-25brew.sh: fix code style inconsistencyMartin Afanasjew
Originally introduced by me in 77975168e0f2d5e6627d049d6055bc159e3fd89d.
2016-05-18brew.sh: drop obsolete source in update-preinstallMartin Afanasjew
No need to source `cmd/update.sh` if `homebrew-update` is not going to be called directly. Amends 750bb24a787dc6e4a13f2b842a3e8dcb8d5fb761.
2016-05-13fix shellcheck complaintXu Cheng
2016-05-13move git shell function to brew.shXu Cheng
git is also used in analytics.sh
2016-05-13brew.sh: use brew update in update-preinstallXu Cheng
Preinstall update should be performed in a separate process, so it can maintain and close its own update lock.
2016-05-13move brew shell function to brew.shXu Cheng
2016-05-08Make bottle code cross-platform.Mike McQuaid
2016-05-03update: improve some edge cases.Mike McQuaid
- When running `brew update` and there’s been no changes from upstream on any repositories there’s no need to call the (relatively) slow `brew update-report` when we already know what it will say (“Already up-to date.”). - When any`git fetch`es fail then throw out an error at the end of the output and produce a failing exit code (closes #65).
2016-05-01add `brew analytics` command (#173)Xu Cheng
2016-04-18brew.sh: error out if no Ruby found.Mike McQuaid
This is a nicer error message than the `exec` failing at a later stage.
2016-04-12Homebrew (opt-in) Analytics tweaks. (#57)Mike McQuaid
- add `HOMEBREW_PRODUCT` global variable - only differentiate between `/usr/local` and `non-/usr/local` Homebrew prefixes to avoid sharing sensitive user information - note if e.g. build errors are occurring under CI - Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out when this is enabled for everyone) - Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics that are sent - Move Bash analytics code to `Library/Homebrew/utils/analytics.sh` - Add documentation for our analytics and why/what/when/how and opt-out - Only official Homebrew commands are reported - Ruby analytics are now reported in a forked, background process
2016-04-11Auto-update when running `brew install`/`upgrade`.Mike McQuaid
Also, slightly tweak the behavior of `brew update` in this case so that it doesn't print annoying output and still allows the `brew edit` flow for people with `HOMEBREW_DEVELOPER` set.
2016-04-10Implement the `brew help` commandMax Nordlund
This is also used by `brew <cmd> --help`. The basic idea is to have the documentation as a top level comment in each command file. To find these comments, they have to be like this `#:`. This is also used by the `brew man` command to keep the documentation DRY, and for that there are now a header and footer for the man page.
2016-04-08brew.sh: make sure to always use system 'awk'Martin Afanasjew
This should prevent issues like #47 and make us more resilient.
2016-04-07brew.sh: tweak HOMEBREW_PROCESSOR on LinuxMartin Afanasjew
`uname -p` seems to be less useful on Linux (Debian 8 yields `unknown`), thus prefer `uname -m` on those systems to determine the processor type. Closes #35. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-07brew.sh: fix HOMEBREW_OS_VERSION on Linux et al.Martin Afanasjew
On Linux (and other non-OS X platforms), `HOMEBREW_OS_VERSION` was *always* replaced with the product name, leading to less useful user agent. E.g., on a reasonably up-to-date Debian system: Linuxbrew/0.9.9 (Linux; unknown Linuxbrew) With this fix the user agent is instead (first if `lsb_release` is available and outputs something, second otherwise): Linuxbrew/0.9.9 (Linux; unknown Debian GNU/Linux 8.3 (jessie)) Linuxbrew/0.9.9 (Linux; unknown 3.16.0-4-amd64)
2016-04-07brew.sh: avoid unnecessary 'cat'Martin Afanasjew
Bash can read directly from a file in its command substitution.
2016-04-07brew.sh: simplify HOMEBREW_OSX_VERSION_NUMERICMartin Afanasjew
Use `printf -v` and strip out the unnecessary `echo`, thus avoiding two unnecessary command substitutions.
2016-04-07brew.sh: streamline setting HOMEBREW_{OSX,LINUX}Martin Afanasjew
For uses like this one, `case` is much more compact and easier to read.
2016-04-07always prefer HOMEBREW_CURL over plain 'curl'Martin Afanasjew
2016-04-06brew.sh: make analytics 'curl' fully asynchronousMartin Afanasjew
If analytics are enabled and `brew` is used in a command substitution context, e.g. `brew search` for tab completion, the result is that even though the Google Analytics `curl` process runs in the background it still is attached to the captured `stdout`, thus could theoretically contribute to the result of the command substitution and consequently makes the command substitution block on the completion of this process. Redirecting `stdout` (and `stderr` for good measure) to `/dev/null` makes this process truly asynchronous in these contexts. Furthermore, even if the process is in the background, it is still included in the shell's job list and thus shell internals like `wait` (used in `cmd/update.sh`) have to wait on this process, even if they never intended to do so. Removing the analytics process from the job list via `disown` avoids this unintended effect. Fixes #29. Closes #34. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-04Add opt-in Google Analytics.Mike McQuaid
Add the first Google Analytics usage to monitor the command names that are run by Homebrew.
2016-04-04Make Homebrew user agent consistent, use a slash.Mike McQuaid
Generally it seems user agents are all `software/version` but ours is not. Also, set the user agent in a way that it's shared between Bash and Ruby code. Closes https://github.com/Homebrew/legacy-homebrew/pull/50480.
2016-04-03Core/formula separation Part 2(b)0.9.9Xu Cheng
* 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
2016-04-02bump Homebrew version to 0.9.80.9.8Xu Cheng
So we can know whether a Homebrew installation is pre or post core/formula separation. Will update to 0.9.9 when moving core code to new repo.
2016-03-11Fix `brew update` user agent.Mike McQuaid
This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately filtered. Closes Homebrew/homebrew#49961. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-09brew.sh: add tap-pin to sudo check listXu Cheng
2016-02-27brew.sh: improve empty argument handlingMartin Afanasjew
Follow-up to Homebrew/homebrew#49327 that leaves empty argument handling to the Ruby code (it is a bit more sophisticated and distinguished between `help` and an empty argument list and treats them differently) instead of hard-wiring the former to the `help` command. Closes Homebrew/homebrew#49538. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-02-26brew.sh: drop reference to removed 'update-ruby'Martin Afanasjew
This is a follow-up fix to a minor oversight in Homebrew/homebrew#49523.
2016-02-19brew: print help when no commands givenMisty De Meo
Fixes Homebrew/homebrew#49325. Closes Homebrew/homebrew#49327. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-16bin/brew: move logic to Library.Mike McQuaid
`bin/brew` is getting a bit bloated and it's annoying to open all of `HOMEBREW_PREFIX` in your editor of choice and have it search through the `Cellar`. Let's instead keep the bare minimum in `bin/brew` and move the rest to `Library`. Closes Homebrew/homebrew#49185. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>