#! /bin/bash

file="${1?}"

test -e "$file" || exit 0

found=$(head -n -1 "$file" | sha1sum | cut -f1 -d' ')
expected=$(tail -n 1 "$1" | cut -f2 -d" ")
test "$found" = "$expected"
