about summary refs log blame commit diff stats
path: root/check_new_clinte_posts.sh
blob: 806c6c7c6612022ac9de392b5aa5709073fb5d08 (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                               
                                                                 





                                                  
                                          
 
#!/bin/sh

LOCAL_FILE="$HOME/.clinte.json"
LOCAL_HASH=$(sha256sum "$LOCAL_FILE" 2>/dev/null | cut -d' ' -f1)

DBFILE="/usr/local/clinte/clinte.json"
DBFILE_HASH=$(sha256sum "$DBFILE" | cut -d' ' -f1)

if [ "$LOCAL_HASH" != "$DBFILE_HASH" ]
then
    printf "%s\n\n" "New posts on clinte!"
fi