eb415db6ba
Modifications to install.sh
2024-12-02 03:23:11 -06:00
Osama Albahrani
f20d07fe1c
install.sh: NONINTERACTIVE vs CI
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com >
2023-07-28 09:44:17 -04:00
Osama Albahrani
08134d7208
install.sh: remove commented-out shift
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com >
2023-07-28 09:26:30 -04:00
Osama Albahrani
723dc192b7
doc: change $0 to install.sh
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com >
2023-07-28 09:25:04 -04:00
Osama Albahrani
ea868ee1d8
doc: install.sh: clarify NONINTERACTIVE
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com >
2023-07-28 09:23:14 -04:00
Osama Albahrani
92f67fa0a8
doc: add install.sh --help. Fix #790
...
Adapted from `uninstall.sh`
2023-07-27 18:25:56 -04:00
Mike McQuaid
96362c02f6
install.sh: remove unnecessary variable.
2023-05-23 09:43:48 +01:00
ChillerDragon
800df6bd7a
Fix ./bin being in $PATH (mac)
2023-05-22 20:33:47 +02:00
ChillerDragon
be7579abe3
Fix git outdated error saying git is not installed
...
Fixes #773
2023-05-17 23:22:24 +02:00
b8rky
f18475ba4d
install: support OCI containers as root
2023-04-01 20:09:32 +00:00
Chiller Dragon
11bcaa8fdb
Update install.sh
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com >
2023-03-13 18:05:50 +01:00
Chiller Dragon
41842df713
Match git version with regex
...
Co-authored-by: Adrian Ho <the.gromgit@gmail.com >
2023-03-11 20:22:03 +01:00
ChillerDragon
c699c94017
Ignore local paths in $PATH in find_tool
...
Fixes the installer failing if `./bin` is at the begging of `$PATH`
Ensures the installer does not pick a local path to
the git executable
Could happen if one has `export PATH='./bin:$PATH` in the shell rc file
then it would set USABLE_GIT to be `./bin/git`
which later fails when another cd was executed
So `command -v git` migth spit out `./bin/git`
The fix is using `find_tool` instead of `command -v`
and `find_tool` ignores all paths that do not start
with a leading slash
Co-authored-by: Adrian Ho <the.gromgit@gmail.com >
2023-03-10 10:33:45 +01:00
Adrian Ho
ce3f3e050e
install: use known-good Git
...
Since we're testing each `git` in `$PATH` for suitability, we might as well use the one we've approved. :)
Addresses https://github.com/orgs/Homebrew/discussions/4275 .
2023-02-28 16:43:45 +08:00
Aaron
082152be23
Remove comment
2023-02-26 05:38:53 -08:00
Aaron
846897654e
Merge branch 'append-to-shell-profile' of https://github.com/UnrealApex/install into append-to-shell-profile
2023-02-24 16:53:14 +00:00
Aaron
5613825329
Use command instead of type to check if brew is already in path
2023-02-24 16:51:32 +00:00
Aaron
95306abb70
Remove extra spaces
...
Co-authored-by: Xuehai Pan <XuehaiPan@outlook.com >
2023-02-23 23:29:12 -08:00
Aaron
9649476486
Check for brew in $PATH
...
Co-authored-by: Xuehai Pan <XuehaiPan@outlook.com >
2023-02-23 22:24:10 -08:00
Aaron
b54c6544bf
Merge branch 'Homebrew:master' into append-to-shell-profile
2023-02-23 17:47:50 -08:00
Aaron
f3b514914e
Remove empty else block
2023-02-23 16:15:07 -08:00
Aaron
e67c173403
Rewrite if statement
2023-02-23 17:10:28 +00:00
Aaron
6b692a85ef
Fix grep condition
...
Co-authored-by: Adrian Ho <the.gromgit@gmail.com >
2023-02-23 08:52:15 -08:00
Aaron
2a853264cf
Remove grep flag causing error
...
Co-authored-by: Adrian Ho <the.gromgit@gmail.com >
2023-02-23 08:50:51 -08:00
Ruoyu Zhong
251fb05b7e
install.sh: override default branch config for git init invocations
...
Same as #747 , but with a better approach which should be compatible
with older versions of `git`. This makes sure `git init` always creates
a `master` branch.
The same is being done at
76b87c4a00/Library/Homebrew/dev-cmd/tap-new.rb (L162) .
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com >
2023-02-23 23:20:06 +08:00
Mike McQuaid
8e670a881b
Revert "install.sh: ensure master is used for git init"
2023-02-23 13:20:19 +00:00
Ruoyu Zhong
3dfd4cfda7
install.sh: ensure master is used for git init
...
This is not the case when `init.defaultBranch` is set to something else,
like `main`. And in that case, if `HOMEBREW_DEVELOPER` is also set, the
`Homebrew/brew` repository and `homebrew/core` (if tapped) will stay on
that branch instead of `master` (and won't be updated anymore since
there will be no tracking information available).
Also, for consistency, replace the short option `-q` with `--quiet`, the
long one.
Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com >
2023-02-23 12:36:55 +08:00
Aaron
6051199c7d
Pass CI
2023-02-22 19:44:24 +00:00
Aaron
1c8f9f699c
Store grep in a variable
2023-02-22 19:35:42 +00:00
Aaron
81caa76a40
Revert "Simplify control flow"
...
This reverts commit 4d6ff28b79 .
2023-02-22 19:00:04 +00:00
Aaron
4d6ff28b79
Simplify control flow
2023-02-22 18:52:51 +00:00
Aaron
768135b1e5
Change wording of message
2023-02-22 10:12:35 -08:00
Aaron
ece55f2fb1
Print nothing if brew is already set up in PATH
2023-02-22 16:33:46 +00:00
Aaron
445cdacf5c
Fix formatting
2023-02-21 16:28:32 +00:00
Aaron
fe627df849
Update comment
2023-02-21 01:40:45 -08:00
Aaron
3e30f8ff53
Added additional missing --no-messages flag
2023-02-20 18:06:20 -08:00
Aaron
e3656dfe8e
Simpler stdout and stderr redirection
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com >
2023-02-20 17:59:34 -08:00
Aaron
2c0ba28f05
Merge branch 'append-to-shell-profile' of https://github.com/UnrealApex/install into append-to-shell-profile
2023-02-20 10:54:21 +00:00
Aaron
25bbd886a2
Check if brew is already running in current shell environment
2023-02-20 10:52:13 +00:00
Aaron
f9e39e5e44
Remove extra line
2023-02-20 00:22:17 -08:00
Aaron
3f32b4e547
Readd silent flag
2023-02-20 00:20:22 -08:00
Aaron
4d3936f7b3
Show different instructions if user already has Homebrew in their path
2023-02-20 08:17:37 +00:00
Aaron
a0f52831f7
Use full flags instead of their shorthands
2023-02-19 09:42:29 -08:00
Aaron
876891144b
Check if Homebrew path evaluation statement is already in shell profile
2023-02-19 09:26:11 -08:00
Mike McQuaid
f1df209948
Merge pull request #732 from MikeMcQuaid/install_from_api_default
...
Use HOMEBREW_INSTALL_FROM_API by default
2023-02-16 08:42:22 +00:00
Mike McQuaid
fc4a19b386
Merge pull request #727 from gromgit/always-shellenv
...
install.sh: always recommend `brew shellenv`
2023-02-09 12:34:40 +00:00
Mike McQuaid
ef9cc4607b
install.sh: fix variable name.
...
Co-authored-by: Nanda H Krishna <me@nandahkrishna.com >
2023-02-07 09:22:04 +01:00
Mike McQuaid
aaf4c10366
Use HOMEBREW_INSTALL_FROM_API by default
...
Now that this is the default, tweak the logic and messaging.
2023-02-06 22:16:12 +01:00
Mike McQuaid
6b1f221b0a
install.sh: support HOMEBREW_NO_INSTALL_FROM_API.
...
Follow-up from https://github.com/Homebrew/brew/pull/14375 .
We'll keep this around after `HOMEBREW_INSTALL_FROM_API` is default.
2023-01-18 14:04:04 +00:00
Adrian Ho
012d4f8632
install.sh: always recommend brew shellenv
...
Currently, Intel macOS installs almost certainly *don't* recommend
`brew shellenv`, because `/usr/local` is in `PATH` by default.
Since `brew shellenv` is designed to be idempotent, and it sets
environment variables like `INFOPATH` which can affect Homebrew
operations in unexpected ways (e.g. https://github.com/Homebrew/brew/issues/14356#issuecomment-1380557154 ),
I think `brew shellenv` should *always* be recommended.
Closes https://github.com/Homebrew/brew/issues/14362 .
Also fix the "no trailing newline in profile" case by adding our own.
2023-01-16 20:57:56 +08:00