brew

https://github.com/homebrew/brew

Ruby

🍺 The missing package manager for macOS

Formula#share

The directory where the formula's shared files should be installed.
This is symlinked into `HOMEBREW_PREFIX` after installation or with
`brew link` for formulae that are not keg-only.

Need a custom directory?
<pre>(share/"concept").mkpath</pre>

Installing something into another custom directory?
<pre>(share/"concept2").install "ducks.txt"</pre>

Install `./example_code/simple/ones` to share/demos
<pre>(share/"demos").install "example_code/simple/ones"</pre>

Install `./example_code/simple/ones` to share/demos/examples
<pre>(share/"demos").install "example_code/simple/ones" => "examples"</pre>

Source | Google | Stack overflow

Edit

git clone [email protected]:homebrew/brew.git

cd brew

open Library/Homebrew/formula.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Formula-share-for-pr


# Commit to git

git add Library/Homebrew/formula.rbgit commit -m "better docs for Formula#share"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Formula-share-for-pr

hub pull-request


# Celebrate!