--- /dev/null
+d6e0677c490230e96f24cdbd1c300a77 ./dvorak.html
+9fc9c704c41b3347e05b00c603955fe7 ./hashes.txt
+5b69e6c9c8ed13cca3206cc6ad2652dd ./index.html
+72ac29b74f3e09c551aa10a2a8d2581d ./lejos-ubuntu.html
+0ba6cb2c3a9d7d8ba27406d215aa501e ./mart@martlubbers.net.asc
+146f1bb6bed2adfd4d13f9644390db71 ./nsa-dropbox.html
+75068866762dc200d6e185bfe9b3a2bf ./o.html
+ce31052406b3874b287e98c8a9477516 ./p.jpg
+95b2932b7da95664dcef20097b1b58df ./put.bash
+43eb61826bc538817b4c78c7f8d57019 ./README.md
+4be5b32df3dedb74eeb758b233864fe6 ./robots.txt
+5caad6ee7880531cf07efc21591c0ec0 ./style.css
+d69f225d06c3d7a417fb5e8159efc2d1 ./test.php
+2ed34aa229468632cce58151c33d1ebc ./wlan-debian.html
+d07dca8f45b3f046558216cf3ac96c28 ./youtube-term.html
GPG ID: <a href="http://martlubbers.net/mart@martlubbers.net.asc">AD3FEBE7</a><br />
Fingerprint: 74FF FBF1 4758 273B 2F56 A30C A937 B7A1 AD3F EBE7<br />
<a href="http://www.linkedin.com/pub/mart-lubbers/1b/76a/763">LinkedIn</a><br />
+ <a href="https://github.com/dopefishh">Github</a><br />
</td>
</tr>
</table>
#!/bin/bash
set -e
-for f in $(find . -type f | grep -v "put\|/\.\|^\.$\|/$")
+for f in $(find . -type f -not -name "*hashes*" | grep -v "put\|/\.\|^\.$\|/$")
do
- curl -u $(gpg --use-agent -d ~/passwd.gpg | grep ftp-user | awk '{print $2":"$3}') -T $f ftp://martlubbers.net/public_html/$f
+ dir=$(dirname $f)
+ if [ "$(md5sum $f | awk '{print $1}')" = "$(grep $(basename $f) $dir/hashes.txt | awk '{print $1}')" ]
+ then
+ echo "$f didn't change..."
+ else
+ echo "$f did change..."
+ curl -u $(gpg --use-agent -d ~/passwd.gpg | grep ftp-user | awk '{print $2":"$3}') -T $f ftp://martlubbers.net/public_html/$f
+ fi
done
+echo "recalculating hashes"
+md5sum ./* > hashes.txt
+cd files
+md5sum ./* > hashes.txt
+cd ..