X-Git-Url: https://arthur.barton.de/gitweb/?p=homebrew-alex.git;a=blobdiff_plain;f=cmd%2Fbrew-run;h=26ad5380f47faf2b7634c923a1ba8194173485ae;hp=7d499e4f9d07264c37a16884f81479d931f964f0;hb=HEAD;hpb=88e3697d9d5ae4d086f7dcb08206328849de948b diff --git a/cmd/brew-run b/cmd/brew-run index 7d499e4..26ad538 100755 --- a/cmd/brew-run +++ b/cmd/brew-run @@ -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