10-10-2014, 01:42 PM
I've improved this.
save this script to /usr/scripts
name it md5
Name: Check MD5
Description: Computes MD5 checksum for the selected file.
Command:
--------------------------------------------------------------
File pattern:
Check all boxes except Directories
save this script to /usr/scripts
name it md5
Code:
#!/bin/bash
md5_file="$1"
# Start MD5sum of a selected file
md5sum $md5_file | tee >(cut -d ' ' -f1 > /tmp/sum) |zenity --progress --title="MD5sum" --text="Calculating md5sum for:\n${md5_file##*/}" --pulsate --auto-close
# If Cancel is clicked then remove temporary file and exit
if [ "${PIPESTATUS[2]}" -ne "0" ]; then
rm /tmp/sum
exit 0
fi
# Display calculated md5sum
sum=`cat /tmp/sum`
zenity --info --title="MD5sum" --text="MD5sum : $sum\nFile : ${md5_file##*/}"
rm /tmp/sum
Name: Check MD5
Description: Computes MD5 checksum for the selected file.
Command:
Code:
/usr/scripts/md5 %f
File pattern:
Code:
*.iso;*.ISO;*.img;*.IMG