Last active
November 3, 2015 21:31
-
-
Save kristianlm/0841d0b0290f06f826be 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
expected="c109d23ad00e8a50cf33ae1c3d811b2cd7a0bafe" | |
fn=index.html | |
curl -s google.com/$fn > /$fn.part | |
cs=`sha1sum /$fn.part | cut -d " " 1` | |
if [ "$cs" == "$expected"] ; then | |
echo "checksum ok $cs" | |
mv /$fn.part /$fn:$cs | |
else | |
echo "checksum fail $cs" | |
exit -12 | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment