4 # For original author please refer to:
5 # http://kde-look.org/content/show.php/KonqCheckSum?content=83460
7 md5
=`md5sum $1 | awk '{ print $1;}'`
8 sha1
=`sha1sum $1 | awk '{ print $1;}'`
9 sha256
=`sha256sum $1 | awk '{ print $1;}'`
13 if [ -f $1.md5
]; then
14 refmd5
=`cat $1.md5 | awk '{ print $1;}'`
15 if [ "$md5" != "$refmd5" ]; then
16 kdialog
--icon=security-low.png
--sorry "md5 doesn't match!"
23 if [ -f $1.sha1
]; then
24 refsha1
=`cat $1.sha1 | awk '{ print $1;}'`
25 if [ "$sha1" != "$refsha1" ]; then
26 kdialog
--icon=security-low.png
--sorry "sha1 doesn't match!"
33 if [ -f $1.sha256
]; then
34 refsha256
=`cat $1.sha256 | awk '{ print $1;}'`
35 if [ "$sha256" != "$refsha256" ]; then
36 kdialog
--icon=security-low.png
--sorry "sha256 doesn't match!"
44 kdialog
--icon=security-medium
--error "No checksum files exist for this file."
48 if [ $ERROR = 0 ]; then
49 kdialog
--icon=security-high
--msgbox "Checksums match."