Last active
January 18, 2018 08:49
-
-
Save sunnyone/f4fcee33290b7f438181f57f4f2c8fa3 to your computer and use it in GitHub Desktop.
Wait CloudFront deployed
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 | |
if [ -z "$1" ] ; then | |
echo usage: $0 id | |
exit 1 | |
fi | |
CLOUDFRONT_ID=$1 | |
while true; do | |
STATUS=$(aws cloudfront get-distribution --id "$CLOUDFRONT_ID" | jq -r .Distribution.Status) | |
echo $STATUS | |
if [ "$STATUS" = "Deployed" ] ; then | |
notify-send "CloudFront status is done" | |
exit | |
fi | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment