Symlink to the latest version formula directory in Homebrew

4

4

I'm kinda just starting with OS X and Homebrew, yet I find it very useful. However I have one problem: is there a way to make Homebrew automatically create a symlink to the directory of the latest version of a formula? For example, after installing gradle we have

/usr/local/Cellar/gradle/1.6

and it would be very handy (for external configurations) to have also something like

/usr/local/Cellar/gradle/current

(helps with avoiding reconfiguration after formula was updated).

Wojtek

Posted 2013-05-10T08:41:18.753

Reputation: 367

Answers

12

This used to be in another place, but now you will find the current versions symlinked here:

/usr/local/var/homebrew/linked/

slhck

Posted 2013-05-10T08:41:18.753

Reputation: 182 472

Updated answer, see also the post below. – slhck – 2017-02-27T17:08:20.750

2

The current accepted answer is outdated. For me:

$ brew --version
Homebrew 1.1.9

The current formula directories are symlinked in:

/usr/local/var/homebrew/linked/

Kache

Posted 2013-05-10T08:41:18.753

Reputation: 821

1I fixed my answer. You could have also left me a comment – or even proposed your edit – and I would have updated it. This way I didn't even notice it was wrong or outdated. – slhck – 2017-02-27T19:25:17.350