home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / cool.lha / ice / util / os2get < prev    next >
Encoding:
Text File  |  1991-09-04  |  1.6 KB  |  65 lines

  1. #! /bin/csh
  2. #
  3. # Copyright (C) 1991 Texas Instruments Incorporated.
  4. #
  5. # Permission is granted to any individual or institution to use, copy, modify,
  6. # and distribute this software, provided that this complete copyright and
  7. # permission notice is maintained, intact, in all copies and supporting
  8. # documentation.
  9. #
  10. # Texas Instruments Incorporated provides this software "as is" without
  11. # express or implied warranty.
  12. #
  13. # Create an OS2 command file (os2get.cmd) which will get via ftp cool files 
  14. # on a remote UNIX host from an IBM PS/2.
  15. #
  16. # Usage: cd ice; util/os2get [<host> <login> <passwd>];
  17. # Example: cd ice; util/os2get
  18. #
  19. # On OS/2 run os2get.cmd
  20. #
  21. #
  22.  
  23. set ICE = `pwd`
  24. set OUT=util/os2get.cmd
  25. set HOST = tan
  26. set LOGIN = cherry
  27. set PASSWD = poptart
  28.  
  29. if ($1 != "") then
  30.   set HOST=$1
  31.   set LOGIN=$2
  32.   set PASSWD=$3
  33. endif
  34.  
  35. echo "Creating ftp OS2 command file, util/os2get.cmd"
  36. echo "open $HOST" > $OUT
  37. echo "$LOGIN" >> $OUT
  38. echo "$PASSWD" >> $OUT
  39.  
  40. if -e /tmp/cooldirs then
  41.  echo "using /tmp/cooldirs"
  42. else 
  43.  echo "Finding cool directories"
  44.  echo "ice" > /tmp/cooldirs
  45.  echo "ice/ice_defs" > /tmp/cooldirs
  46.  echo "ice/cpp" >> /tmp/cooldirs
  47.  echo "ice/CCC" >> /tmp/cooldirs
  48.  echo "ice/test" >> /tmp/cooldirs
  49.  (find $ICE/cool/* -type d -print | egrep -v 'RCS' >> /tmp/cooldirs)
  50. endif
  51.  
  52. foreach DIR (`cat /tmp/cooldirs`)
  53.   set OS2DIR=`echo "$DIR" | sed -e s'@/@\\\\@'g -e 's/^/\\\\/' `
  54.   echo lcd "$OS2DIR" >> $OUT
  55.   echo cd "$ICE/../$DIR" >> $OUT
  56.   echo nmap \$1.\$2 \$1.cxx >> $OUT
  57.   echo mget "*.C" >> $OUT
  58.   echo nmap >> $OUT
  59.   echo mget "*.h" >> $OUT
  60.   echo mget "*.c" >> $OUT
  61.   echo mget Imakefile >> $OUT
  62. end
  63. echo "close" >> $OUT
  64. echo "bye" >> $OUT
  65.