Created
May 5, 2016 07:37
-
-
Save hostmaster/3556904f86bc69bae084842910970326 to your computer and use it in GitHub Desktop.
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/bash | |
URL=http://S3_BUCKET.s3.amazonaws.com/FILENAME | |
filename=FILENAME | |
S3_MD5=$(curl -s -I -L $URL | awk '/ETag/ { gsub(/"|\r/,"",$2); print $2 }') | |
MD5="$(md5 -q $filename 2>/dev/null || :)" | |
if [ "$S3_MD5" != "$MD5" ]; then | |
echo "Download" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment