`brew-unpack` is inspired by the `unpack` command of Haskell's Cabal.
`brew unpack <formulae ...>` will fetch the source code archives of one or more
formula and extract them into subfolders of the current working directory. An
alternate root directory may be specified by invoking the `--destdir` flag.
This provides some nice advantages for inspecting source code compared to
`brew install -i -f <formula>`:
- The extracted source code won't be deleted when the Ruby process
terminates---which allows for long-term experimentation.
- The user has control over which directory the code is extracted into.
- No install process is initiated, so accidentally typing the equivalent of
`exit 0` will not cause `brew` to mess with an existing installation.
- Several formulae may be unpacked at once.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
The git command now uses --git-dir instead of --work-tree.
Using --work-tree won't work if you are inside another Git repository.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
If a formula is given, it will be checked for missing deps.
The formula does not have to be installed first.
Without a formula list, still checks all installed brews.
Using 'sudo' should not be required to install npm, and isn't if the
user has used the default Homebrew installation process.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
When the name of a new formula can't be autodetected, it defaults to the empty
string. When it then gets read from user input later on, the new name is used
but the formula path, based on the name, stays empty.
This change sets the path after a new name was read.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
The Fortran regex only allowed for trailing whitespace after:
depends_on 'gfortran'
This missed conditional dependencies, such as:
depends_on 'gfortran' if something?
Such a dependency was present in the NetCDF formula.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>