]> arthur.barton.de Git - homebrew-alex.git/blobdiff - cmd/brew-run
brew-run: Homebrew handles Casks by default as well
[homebrew-alex.git] / cmd / brew-run
index 7d499e4f9d07264c37a16884f81479d931f964f0..26ad5380f47faf2b7634c923a1ba8194173485ae 100755 (executable)
@@ -18,18 +18,20 @@ unset dir ax_common ax_common_sourced
 ax_msg - "Updating Homebrew installation ..."
 brew update || ax_abort "Update failed!"
 
-outdated=$( brew outdated --quiet | wc -l | tr -d '\t ' )
-if [ $outdated -gt 0 ]; then
+outdated=$( brew outdated --verbose | grep -F -cv "pinned at" )
+if [ "$outdated" -gt 0 ]; then
        echo
-       ax_msg - "$outdated formula outdated:"
+       ax_msg - "$outdated formula & casks outdated:"
        brew outdated --verbose || ax_abort "Failed to list outdated packages!"
        echo
 
-       brew upgrade --cleanup || ax_abort "Upgrade failed!"
+       brew upgrade --ignore-pinned || ax_abort "Upgrade failed!"
        echo
 
-       ax_msg - "Linking applications ..."
-       brew linkapps --local || ax_abort "Linking of applications failed!"
+       ax_msg - "Cleaning up ..."
+       brew cleanup --prune=2 || ax_abort "\"brew cleanup\" failed!"
+       echo
 else
        ax_msg 0 "Nothing outdated."
+       echo
 fi