home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / h2d130.zip / BIN / h2dwork.cmd < prev   
OS/2 REXX Batch file  |  1996-09-17  |  1KB  |  47 lines

  1. /***********************************************
  2.                   H2D v1.1
  3.  
  4.        Working Directory Creation Script
  5.  
  6.          Copyright (c) 1996 xTech Ltd.
  7. ************************************************/
  8.  
  9. '@echo off'
  10. Call RxFuncAdd 'SysLoadFuncs','RexxUtil','SysLoadFuncs'
  11. Call SysLoadFuncs
  12.  
  13. call SysCls
  14. call SysCurState off
  15. say
  16. say "    Do you want to create appropriate subdirectories"
  17. say "    and redirection file in directory" directory() "? (Y/N)"
  18.  
  19. do forever
  20.   key = translate(SysGetKey('NOECHO'));
  21.   if (key = 'Y') | (key = 'N') | (key = X2C(27)) then leave
  22. end
  23. if key <> 'Y' then exit
  24.  
  25. parse source . . home
  26. home = left(home,lastpos('\',home)-1)      /* Strip "\<cmd-name>" */
  27. home = left(home,lastpos('\',home)-1)      /* Strip "\BIN" */
  28.  
  29. say "    creating directory structure..."
  30. 'mkdir DEF H SRC'
  31. if rc <> 0 then do
  32.   say "Error making subdirectories"
  33.   exit 1
  34. end
  35.  
  36. say "    creating appropriate redirection file..."
  37. 'echo>h2d.red *.def  = .\def'
  38. 'echo>>h2d.red *.mod  = .\src'
  39. 'echo>>h2d.red *.h    = .\h'
  40. 'echo>>h2d.red *.h2d  = .'
  41.  
  42. say ''
  43. say '    DONE'
  44. say ''
  45. exit
  46.  
  47.