-1

I'm currently using the Homebrew package manager, and I have to say that it is really really great!

My question is: there is a way to automate brew update and brew upgrade in order to execute this commands when a shell is opened? I'm not very expert about bash programming, so I'm not sure if this thing is possible or not, I'm currently using iTerm.

Anton Dozortsev
  • 3,074
  • 20
  • 21
g_rmz
  • 305

2 Answers2

4

I agree with @fd0 that this probably shouldn't be automated to the point of launching it for every shell. This can get ugly if you have multiple shell windows. I opted for a semi-automated solution by creating an alias in my ~/.profile that performs several brew functions. Check out this post for details.

SaxDaddy
  • 4,137
1

Automating such a process in a shell startup file is a bad idea. Every new instance of a shell would execute both commands. You could place a function in your .bashrc and and call the function which would cut down on the number of characters that you need to type but that's not a real game changer.

fd0
  • 1,548