Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew cask upgrade #23658

Closed
voxsim opened this issue Aug 11, 2016 · 4 comments
Closed

brew cask upgrade #23658

voxsim opened this issue Aug 11, 2016 · 4 comments

Comments

@voxsim
Copy link

voxsim commented Aug 11, 2016

I recently create a script to upgrade every package in my machine installed through brew cask.

Would be interesting add this functionality to homebrew-cask? Is it already in roadmap? Would be it useful if I try to code that and make a pull request?

PS This is the script:

#!/usr/bin/env bash

# get the list of installed casks
casks=( $(brew cask list) )

for cask in ${casks[@]}; do
  current="$(brew cask info $cask | sed -n '1p' | sed -n 's/^.*: \(.*\)$/\1/p')"
  installed=( $(ls /opt/homebrew-cask/Caskroom/$cask))
  if (! [[ " ${installed[@]} " == *" $current "* ]]); then
    echo "Upgrading $cask to v$current."
    (set -x; brew cask install $cask --force;)
  else
    echo "$cask v$current is up-to-date, skipping."
  fi
done

thanks in advance,
voxsim

@vitorgalvao
Copy link
Member

vitorgalvao commented Aug 11, 2016

This has been discussed multiple times. Many people created such scripts, and they’re all fragile. Please search for it for details, but:

  • Yes, we want to add brew upgrade.
  • No, we will not add your script because:

@voxsim
Copy link
Author

voxsim commented Aug 11, 2016

@vitorgalvao when I stated

Would be it useful if I try to code that and make a pull request?

I was meaning code that in ruby!

Btw thanks for the issue I had a similar problem.

@vitorgalvao
Copy link
Member

I was meaning code that in ruby!

Then yes and no. Yes, a PR would be useful, but upgrade needs to be discussed first and other things (like finishing #13201) need to be done before we can focus on it and discuss how it will work.

@voxsim
Copy link
Author

voxsim commented Aug 11, 2016

ok, i will follow the thread, for now thanks for your time.

@Homebrew Homebrew locked and limited conversation to collaborators May 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants