Skip to content

Instantly share code, notes, and snippets.

@toonetown
Last active March 3, 2019 20:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toonetown/10e99bc35085a01851ab296e1e5f5379 to your computer and use it in GitHub Desktop.
Save toonetown/10e99bc35085a01851ab296e1e5f5379 to your computer and use it in GitHub Desktop.
###########
# Checks if the given cask needs to be upgraded.
#
#!/bin/bash
set -o pipefail
source /etc/profile
if [ $# -eq 0 ]; then
ARGS=($(brew cask list))
else
ARGS=("$@")
fi
for _C in "${ARGS[@]}"; do
[ "$(brew cask _appcast_checkpoint --calculate ${_C} 2>&1)" == "$(brew cask _appcast_checkpoint ${_C} 2>&1)" ] || {
echo "Cask: ${_C} needs to be updated"
}
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment