about summary refs log tree commit diff stats
path: root/check_new_clinte_posts.sh
diff options
context:
space:
mode:
Diffstat (limited to 'check_new_clinte_posts.sh')
-rwxr-xr-xcheck_new_clinte_posts.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/check_new_clinte_posts.sh b/check_new_clinte_posts.sh
new file mode 100755
index 0000000..1d2dfbe
--- /dev/null
+++ b/check_new_clinte_posts.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+LOCAL_FILE="$HOME/.clinte.json"
+LOCAL_HASH=$(sha256sum "$LOCAL_FILE" | 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" "New posts on clinte!"
+fi
\ No newline at end of file