This is just about what I have wanted for some time.seaside wrote:Here's a script that I put together to test md5sums.
I use it on a right-click -file - open with -menu. Paste the md5sum in the box and it makes the comparison.
It also could be adapted to run in other ways as well.Code: Select all
#!/bin/sh -a checksum() { echo "$MDSUM $1" >/tmp/mdsumtmp [ "`md5sum -c /tmp/mdsumtmp`" ] && yaf-splash -font "12x24" -outline 0 -bg green -bd green -text "Checksum OK -- click on message when finished" || yaf-splash -font "12x24" -outline 0 -bg orange -bd orange -text "Checksum BAD! -- click on message when finished" } GUI=$(cat <<EOV|sed "s/#.*//" # enable interpolation and comments <window title="Check Md5sum"> <frame> <hbox> <text> <label>Md5sum digits:</label> </text> <entry activates-default="true"> <default>Paste Md5sum here</default> <variable>MDSUM</variable> </entry> <button can-default="true" has-default="true"> <input file>"/usr/local/lib/X11/pixmaps/archive24.png"</input> <label>Check Sum</label> <action>checksum $1</action> </button> <button cancel> <action type="exit">QUIT</action> </button> </hbox> </frame> </window> EOV) CHOICES=`gtkdialog3 -p GUI`
Cheers,
s
However please could you add these features:
- Quits when Esc is pressed.
- When the splash "Checksum BAD!/ok" is shown. I could do with being able to press enter and and the program quits.