home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / utility / misc / master / batch / tfa.bat < prev    next >
DOS Batch File  |  1989-04-16  |  870b  |  37 lines

  1. set action $1
  2. set options $2
  3. set source $3
  4. set tfafiles $4
  5. set dest $5
  6.  
  7. # tfa haette gerne den Unix-Mode angeschaltet
  8. ifglobal UNIX {;} else {
  9.   Unix
  10.   set nounix
  11. }
  12. # Im erweiterten Unix-Mode ist die Bedeutung von *.* etwas anders
  13. if UNIX in "26" {
  14.   set all *
  15. } else {
  16.   set all *.*
  17. }
  18.  
  19. ifempty dest {            ;# zu wenig Parameter
  20.   rem Usage $0 action options sourcedir files dest
  21.   rem   Example $0 pack -dt /bin *.ttp a:/dest
  22. } else {            ;# jetzt gehts endlich los
  23.   $action $options $source/$tfafiles $dest/
  24.   files -qd $source/$all
  25.   foreach cf in FILES do
  26.     if not exist $dest/$cf {
  27.       md $dest/$cf -q        ;# das ist z.B. bei 'tfa diff ...' unangebracht
  28.     }
  29.     $@ $action $options $source/$cf $tfafiles $dest/$cf
  30.   endfor
  31. }
  32.  
  33. # Der Benutzer hat eventuell andere Vorstellungen, was den Unix-Mode angeht
  34. iflocal nounix {
  35.   nounix
  36. }
  37.