home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -readerstuff- / richard_burke / scripts / lhamaker < prev    next >
Encoding:
Text File  |  1998-05-02  |  2.0 KB  |  99 lines

  1. Resident >NIL: C:RequestFile PURE
  2. Resident >NIL: C:RequestChoice PURE
  3.  
  4. ; $VER: LhAMaker v1.0 (11.7.96) Richard Burke
  5.  
  6. if EXISTS ENV:Files
  7.         delete >NIL: ENV:Files
  8. endif
  9.  
  10. if EXISTS ENV:Mr
  11.         delete >NIL: ENV:Mr
  12. endif
  13.  
  14. if EXISTS ENV:Drawer
  15.         delete >NIL: ENV:Drawer
  16. endif
  17.  
  18. if EXISTS ENV:Drawers1
  19.         delete >NIL: ENV:Drawers1
  20. endif
  21.  
  22. if EXISTS ENV:Final
  23.         delete >NIL: ENV:Final
  24. endif
  25.  
  26. if EXISTS ENV:Save
  27.         delete >NIL: ENV:Save
  28. endif
  29.  
  30. if EXISTS ENV:Lha
  31.         delete >NIL: ENV:lha
  32. endif
  33.  
  34. which lha all >ENV:LHa
  35. if WARN
  36.         Requestchoice "LhAMaker Error Message" "Can't find 'LhA' tool! *nSee docs for details!" "Quit"
  37.         quit
  38. endif
  39.  
  40. Requestfile >ENV:Files TITLE "Choose the file(s) to crunch" POSITIVE Crunch MULTISELECT
  41. if WARN
  42.         delete >NIL: ENV:Files
  43.         skip drw
  44. endif
  45.  
  46. lab Drw
  47. Requestfile >ENV:Drawer TITLE "Choose the drawer to crunch" DRAWERSONLY POSITIVE Crunch
  48. if WARN
  49.         delete >NIL: ENV:Drawer
  50.         skip ex
  51. endif
  52.  
  53. lab MrDrw
  54. Requestchoice >ENV:Mr "More drawers to crunch?" "Do you want to crunch more drawers?" "Yes" "No"
  55. if $Mr EQ "0"
  56.         skip ex
  57. else skip drw1
  58. endif
  59.  
  60. lab Drw1
  61. Requestfile >ENV:Drawers1 TITLE "Choose the drawer to crunch" DRAWERSONLY POSITIVE Crunch
  62. if WARN
  63.         delete >NIL: ENV:Drawers1
  64.         skip ex
  65. else join ENV:Drawers1 ENV:Drawer TO ENV:Drawers
  66.         delete >NIL: ENV:Drawers1
  67.         delete >NIL: ENV:Drawer
  68.         rename ENV:Drawers ENV:Drawer QUIET
  69.         skip back MrDrw
  70. endif
  71.  
  72. lab Ex
  73. if EXISTS ENV:Files
  74.         if EXISTS ENV:Drawer
  75.                 join ENV:Files ENV:Drawer TO ENV:Final
  76.                 skip sav
  77.         endif
  78. rename ENV:Files ENV:Final QUIET
  79. skip sav
  80. endif
  81.  
  82. if NOT EXISTS ENV:Files
  83.         if EXISTS ENV:Drawer
  84.                 rename ENV:Drawer ENV:Final QUIET
  85.                 skip sav
  86.         endif
  87.         if NOT EXISTS ENV:Drawer
  88.                 quit
  89.         endif
  90. endif
  91.  
  92. lab Sav
  93. Requestfile >ENV:Save TITLE "Save archive as . . ." DRAWER Ram: FILE .lha POSITIVE Save
  94. if WARN
  95.         quit
  96. endif
  97.  
  98. lab end
  99. $lha -Fr2a a $Save $Final