home *** CD-ROM | disk | FTP | other *** search
- #! /bin/csh
- #
- # Copyright (C) 1991 Texas Instruments Incorporated.
- #
- # Permission is granted to any individual or institution to use, copy, modify,
- # and distribute this software, provided that this complete copyright and
- # permission notice is maintained, intact, in all copies and supporting
- # documentation.
- #
- # Texas Instruments Incorporated provides this software "as is" without
- # express or implied warranty.
- #
- # Create an OS2 command file (os2get.cmd) which will get via ftp cool files
- # on a remote UNIX host from an IBM PS/2.
- #
- # Usage: cd ice; util/os2get [<host> <login> <passwd>];
- # Example: cd ice; util/os2get
- #
- # On OS/2 run os2get.cmd
- #
- #
-
- set ICE = `pwd`
- set OUT=util/os2get.cmd
- set HOST = tan
- set LOGIN = cherry
- set PASSWD = poptart
-
- if ($1 != "") then
- set HOST=$1
- set LOGIN=$2
- set PASSWD=$3
- endif
-
- echo "Creating ftp OS2 command file, util/os2get.cmd"
- echo "open $HOST" > $OUT
- echo "$LOGIN" >> $OUT
- echo "$PASSWD" >> $OUT
-
- if -e /tmp/cooldirs then
- echo "using /tmp/cooldirs"
- else
- echo "Finding cool directories"
- echo "ice" > /tmp/cooldirs
- echo "ice/ice_defs" > /tmp/cooldirs
- echo "ice/cpp" >> /tmp/cooldirs
- echo "ice/CCC" >> /tmp/cooldirs
- echo "ice/test" >> /tmp/cooldirs
- (find $ICE/cool/* -type d -print | egrep -v 'RCS' >> /tmp/cooldirs)
- endif
-
- foreach DIR (`cat /tmp/cooldirs`)
- set OS2DIR=`echo "$DIR" | sed -e s'@/@\\\\@'g -e 's/^/\\\\/' `
- echo lcd "$OS2DIR" >> $OUT
- echo cd "$ICE/../$DIR" >> $OUT
- echo nmap \$1.\$2 \$1.cxx >> $OUT
- echo mget "*.C" >> $OUT
- echo nmap >> $OUT
- echo mget "*.h" >> $OUT
- echo mget "*.c" >> $OUT
- echo mget Imakefile >> $OUT
- end
- echo "close" >> $OUT
- echo "bye" >> $OUT
-