home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / utility / misc / gulam / examples / cpsetup.g < prev    next >
Text File  |  1989-01-09  |  1KB  |  43 lines

  1.  
  2. # CPSETUP, copy some files, if necessary.
  3.  
  4. # ------------- Variables used ---------------
  5. # list     The list of file names to be copied.
  6. # fn    One file name from the list
  7. # src     The Path and File Name of the source file.
  8. # tgt     The Path and File Name of the target file.
  9. # warn    A warning message.
  10. # ------------- The List ---------------
  11. set    list    " $list arc.ttp "
  12. set    list    " $list diff.prg "
  13. set    list    " $list gu.prg "
  14. set    list    " $list gulam.g "
  15. set    list    " $list gulamend.g "
  16. set    list    " $list head.prg "
  17. set    list    " $list more14.ttp "
  18. set    list    " $list lv.tos "
  19. set    list    " $list uud.ttp "
  20. set    list    " $list uue.ttp "
  21. set    list    " $list vol.ttp "
  22. # ------------- The Loop ---------------
  23. set warn 'Warning, not found: '
  24. foreach fn { $list }
  25.     set src a:\$fn        # the Source directory
  26.     set tgt d:\$fn        # the Target directory
  27.     if { -e $tgt }
  28.         # echo 'found:' $tgt
  29.     ef { -e $src }
  30.         echo ' copy:' $src
  31.         cp $src $tgt
  32.     ef
  33.         echo '        ' $warn $src
  34.     endif
  35. endfor
  36. # ------------- Tidy up ---------------
  37. unset src 
  38. unset tgt 
  39. unset list 
  40. unset warn
  41. unset fn
  42. # ------------- The End ---------------
  43.