Renamed to .sh suffix

This commit is contained in:
Markus Fleschutz
2021-02-06 16:26:14 +01:00
parent 55898acd4e
commit d6333d50ba
4 changed files with 0 additions and 0 deletions

20
Scripts/hashdir.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# requires <hashdeep>
if [ -r new_hashes.xml ]
then
echo "Found new_hashes.xml, renaming it to known_hashes.xml ..."
mv new_hashes.xml known_hashes.xml
fi
echo "Calculating new_hashes.xml of folder $1 ..."
hashdeep -c md5,sha1,sha256,tiger,whirlpool -r -d -l -j 1 $1 > new_hashes.xml
if [ -r known_hashes.xml ]
then
echo "This has changed:"
diff known_hashes.xml new_hashes.xml
fi
exit 0