mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 06:08:36 +01:00
Added hashdir
This commit is contained in:
parent
595b924dee
commit
da12056fc0
20
Scripts/hashdir
Executable file
20
Scripts/hashdir
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# requires <hashdeep>
|
||||||
|
|
||||||
|
if [ -r new_hashes.xml ]
|
||||||
|
then
|
||||||
|
echo "Found new_hashes.xml, renaming it to old_hashes.xml ..."
|
||||||
|
mv new_hashes.xml old_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 old_hashes.xml ]
|
||||||
|
then
|
||||||
|
echo "This has changed:"
|
||||||
|
diff old_hashes.xml new_hashes.xml
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user