Last active
March 2, 2016 22:07
-
-
Save dwallraff/89c8f57948d84235ce3d to your computer and use it in GitHub Desktop.
Script to compare your deployed (single) stemcell with the current version of the stemcell
This file contains 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/bash | |
WEB=$(curl -v --silent https://bosh.io/d/stemcells/bosh-azure-hyperv-centos-7-go_agent 2>&1 | grep Location | awk '{print $3}' | cut -d '/' -f 5 | cut -d '-' -f 3) | |
CUR=$(bosh stemcells 2> /dev/null | grep bosh | awk '{print $6}' | tr -d '*') | |
if (( $WEB > $CUR )); then | |
echo "Update stemcell" | |
else | |
echo "Stemcell is fine" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment