https://github.com/scriptingosx/gnu-bash-mac-installer
Downloads and builds a Mac package installer for GNU bash 5
https://github.com/scriptingosx/gnu-bash-mac-installer
bash deployment mac macadmin macosx pkg pkgbuild
Last synced: 18 days ago
JSON representation
Downloads and builds a Mac package installer for GNU bash 5
- Host: GitHub
- URL: https://github.com/scriptingosx/gnu-bash-mac-installer
- Owner: scriptingosx
- License: apache-2.0
- Created: 2019-02-28T08:33:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-03T14:16:15.000Z (almost 6 years ago)
- Last Synced: 2025-03-29T05:41:24.832Z (about 1 month ago)
- Topics: bash, deployment, mac, macadmin, macosx, pkg, pkgbuild
- Language: Shell
- Size: 14.6 KB
- Stars: 24
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Build a GNU bash package installer for Mac
This script automates the process of downloading, building, and packaging `bash` for macOS.
You can provide a different version to download and build as the first argument. The default value is `5.0`. I have _not_ tested this thoroughly with older versions, use at your own risk.
The resulting package installer will install `bash` in `/usr/local/bin` and the supporting files in `/usr/local`.
This script will change the name of the `bash` binary installed in `/usr/local/bin/` to `bash5` or `bash4` to avoid _any_ naming conflicts with the built-in `bash` v3 in `/bin`. This also allows you to have both bash v4 and bash v5 installed on the same system.
You can change this behavior by setting [the `renamebinary` variable to `0`](https://github.com/scriptingosx/GNU-bash-mac-installer/blob/b6f4190a95849015771fbcc8cff4392fa7239666/buildGNUbashPkg.sh#L18). Or you can modify the `postinstall` script to add a symbolic link.
The path to the `bash` binary will be added to `/etc/shells` on the target system, so that users can use `chsh` to switch their default shell.
You can get more background to this script in [this post on my weblog](https://scriptingosx.com/?p=849).