home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 October / VPR0310.ISO / OS / LINDOWS / lindowsos-edge-nc-4.0.380-2003.07.19_18.25.iso / Double-Click-To-Verify-Media next >
Encoding:
Text File  |  2003-06-06  |  922 b   |  31 lines

  1. #!/bin/bash
  2.  
  3. export SHELL_PATH=`dirname $0`
  4.  
  5. cd $SHELL_PATH
  6. PREFIX="  "
  7.  
  8. MESSAGE="Please wait while we verify your media.\nThis will take several minutes."
  9. MESSAGE=$(echo -e $MESSAGE |  sed -e "s/^/${PREFIX}/" )
  10.  
  11. echo -e "\n\n\n\n$MESSAGE" | xmessage -button "" -center  -geometry 400x200 -file - &
  12.  
  13. FOO=`ps | grep xmessage | grep -v grep | awk '{print $1}'`
  14.  
  15.  
  16. if md5sum -c md5sums.dat >/dev/null 2>&1 ; then
  17.     MESSAGE="Your CD has been verified, and the CD appears to be a useable copy."
  18. else
  19.     MESSAGE="Your CD does not match the check sum information which means something is not right with the CD. You should try burning another CD. If that does not correct the problem, you may need to re-download the .iso file and try again."
  20. fi
  21.  
  22. MESSAGE=$(echo $MESSAGE | fold --spaces --width=50 | sed -e "s/^/${PREFIX}/" )
  23.  
  24. sleep 5
  25.  
  26. echo -e "\n\n\n\n$MESSAGE" | xmessage -center  -geometry 400x200 -file -
  27.  
  28. kill $FOO
  29.  
  30. exit 0
  31.