2 # 2016-01-06, alex@barton.de
4 # Include "ax-common.sh":
5 for dir in "$HOME/lib" "$HOME/.ax" /usr/local /opt/ax /usr; do
6 [ -z "$ax_common_sourced" ] || break
7 ax_common="${dir}/lib/ax/ax-common.sh"
8 [ -r "$ax_common" ] && source "$ax_common"
10 if [ -z "$ax_common_sourced" ]; then
19 unset dir ax_common ax_common_sourced
21 ax_msg - "Updating Homebrew installation ..."
22 brew update || ax_abort "Update failed!"
25 outdated=$( brew outdated --quiet | wc -l | tr -d '\t ' )
26 if [ $outdated -gt 0 ]; then
27 ax_msg - "$outdated formula outdated:"
28 brew outdated || ax_abort "Failed to list outdated packages!"
30 brew upgrade --all || ax_abort "Upgrade failed!"
31 brew linkapps --local || ax_abort "Linking of applications failed!"
34 brew cleanup || ax_abort "\"brew cleanup\" failed!"
35 brew prune || ax_abort "\"brew prune\" failed!"
37 ax_msg - "Nothing outdated."