3 files
=$
(find .
-type f
-not -iwholename "*.git*" -not -name "README.md" -not -name "put.bash" -not -name "hashes.txt")
4 user
=$
(gpg
-q --use-agent -d ~
/pw
/general.asc |
grep ftpmartlubbers.net
-A3 |
head -3 |
tail -2 |
sed 's/\s\+\(user\|pass\):\s\+//g' |
head -c -1 |
tr '\n' ':')
8 origmd5
=$
(grep "$f" .
/hashes.txt |
awk '{print $1}')
9 currmd5
=$
(md5sum "$f" |
awk '{print $1}')
10 if [ "$origmd5" = "$currmd5" ]
12 echo "$f is not changed"
15 curl
-u "$user" -T $f ftp://martlubbers.net
/public_html
/$f
18 md5sum .
/*{,/*} > .
/hashes.txt || true