Created
February 17, 2016 06:42
-
-
Save umi-uyura/e2ca550826d4a11f3ff2 to your computer and use it in GitHub Desktop.
Check for updated Homebrew Cask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Check for updated for Casks. | |
# | |
HOMEBREW_CASK_ROOT="/opt/homebrew-cask/Caskroom/" | |
TREE_COMMAND=`which tree` | |
JQ_COMMAND=`which jq` | |
if [ "" == $TREE_COMMAND ]; then | |
echo "tree command is required." | |
exit | |
fi | |
if [ "" == $JQ_COMMAND ]; then | |
echo "jq command is required." | |
exit | |
fi | |
tree -L 2 -d -f -t --timefmt "%Y/%m/%d %H:%M:%S" -J --noreport $HOMEBREW_CASK_ROOT | jq ".[0].contents | .[] | select(.contents | length > 1) | {name: .name, contents: .contents}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment