home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / mar94 / dev / misc / setpatch.lha / SetPatch / SetPatch37.39 / Update_SetPatch < prev    next >
Text File  |  1993-12-08  |  3KB  |  94 lines

  1. ; $Id: Update_SetPatch,v 37.3 93/05/13 17:36:03 peter Exp $
  2.  
  3. set setpatch_version 37
  4. set setpatch_revision 39
  5. set setpatch_source "SetPatch_${setpatch_version}.${setpatch_revision}"
  6. set setpatch_target c:SetPatch
  7. set install_setpatch 0
  8.  
  9. echo "*N  SetPatch ${setpatch_version}.${setpatch_revision} Installation"
  10. echo "  ===========================*N"
  11. echo "  This script will update your SetPatch to"
  12. echo "  version ${setpatch_version}.${setpatch_revision} if you have an older version.*N"
  13. echo "  You will be asked for permission before proceeding...*N"
  14. echo "  Examining your system...*N"
  15.  
  16. version >NIL: version 37
  17. if warn
  18.     echo "  This SetPatch is for systems with AmigaOS 2.04 or better."
  19.     echo "  Your system appears to be running an older OS."
  20.     echo "  Please consider upgrading to the most recent OS available."
  21.     skip finished
  22. endif
  23.  
  24. check2090
  25. set has2090 $RC
  26.  
  27. if $has2090 EQ 1    ; 2090A
  28.     echo "  2090A hard disk controller detected."
  29.     set setpatch_target Boot:c/SetPatch
  30. endif
  31. if $has2090 EQ 2    ; 2090 - non-autoboot
  32.     echo "  2090 hard disk controller detected."
  33.     set setpatch_target df0:c/SetPatch
  34.     ask "  Please insert your boot floppy into df0:"
  35. endif
  36.  
  37. if not exists ${setpatch_target}
  38.     echo "  Error:  Can't find your old SetPatch..."
  39.     skip finished
  40. endif
  41. if not exists ${setpatch_source}
  42.     echo "  Error:  Can't find the new SetPatch..."
  43.     skip finished
  44. endif
  45.  
  46. if "`version ${setpatch_source}`" NOT EQ "SetPatch ${setpatch_version}.${setpatch_revision}"
  47.     echo "  Error:  New SetPatch is not of the correct version"
  48.     skip finished
  49. endif
  50.  
  51. version ${setpatch_target} version `eval ${setpatch_version}+1` >NIL:
  52.  
  53. if warn
  54.     version ${setpatch_target} version ${setpatch_version} >NIL:
  55.     if warn
  56.         ask "  Your SetPatch needs updating.  Do you wish to proceed?"
  57.         if warn
  58.             set install_setpatch 1
  59.         else
  60.             skip finished
  61.         endif
  62.     else
  63.         version ${setpatch_target} revision ${setpatch_revision} >NIL:
  64.         if warn
  65.             ask "  Your SetPatch needs updating.  Do you wish to proceed?"
  66.             if warn
  67.                 set install_setpatch 1
  68.             else
  69.                 skip finished
  70.             endif
  71.         else
  72.             echo "  You do not need this update, because you already have `version ${setpatch_target}`."
  73.         endif
  74.     endif
  75. else
  76.     echo "  You do not need this update, because you already have `version ${setpatch_target}`."
  77. endif
  78.  
  79. lab finished
  80. if ${install_setpatch} eq 1
  81.     echo "  Updating to SetPatch ${setpatch_version}.${setpatch_revision}..."
  82.     copy ${setpatch_source} ${setpatch_target}
  83.     echo "*N  Reboot your system to have the new SetPatch take effect"
  84.     echo "*N  ****** Done ******"
  85. else
  86.     echo "*N  ****** Done (SetPatch not installed) ******"
  87. endif
  88. unset setpatch_version
  89. unset setpatch_revision
  90. unset setpatch_source
  91. unset setpatch_target
  92. unset install_setpatch
  93. unset has2090
  94.