1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
#!/bin/csh -f
#>
#> PACT-THERE - query a host for a PACT distribution
#>
#> Usage: pact-there -d <directory> -h -l <name> [-g] -sh <host>
#>
#> Options:
#> -d Source directory
#> -h Help Package
#> -l Login name
#> -g Request password
#> -sh Source host
#>
#
# Modification History:
# 08-16-94 Jan Moura, LLNL: Extended prolog
####################
# Source Version: 2.0
# Software Release #92-0043
#
# include "cpyright.h"
#
unalias cd
# see PCD for the reason for this
set Here = `pwd` ; cd ; set RealHome = `pwd` ; cd $Here ; unset $Here
if ($?USER == 0) then
if ($?LOGNAME == 0) then
set USER = "anonymous"
else
set USER = $LOGNAME
endif
endif
set PACTDir = `pwd | sed "s|$RealHome|$home|"`
set LogFile = $PACTDir/query.log
set Src = "FALSE"
set SrcDir = "FALSE"
set help = "FALSE"
set LogID = $USER
set Passwd = ""
set Pattern = 'pact.README pact*-src pact*.tar.gz'
while ($#argv >= 1)
switch ($1)
case -d:
shift
set SrcDir = $1
breaksw
case -g:
echo -n "Password: "
stty -echo
set Passwd = $<
stty echo
echo ""
breaksw
case -h:
set help = TRUE
breaksw
case -l:
shift
set LogID = $1
if ($LogID == "anonymous") then
set Passwd = "$USER@"`uname -n`
endif
breaksw
case -sh:
shift
set Src = $1
breaksw
default:
set help = TRUE
breaksw
endsw
shift
end
if (($SrcDir == "FALSE") || ($Src == "FALSE") || ($help == "TRUE")) then
echo " "
echo "Usage: pact-there -d <directory> -h -l <name> [-g] -sh <host>"
echo " "
echo "Options: "
echo " -d Source directory"
echo " -h Help Package"
echo " -l Login name"
echo " -g request password"
echo " -sh Source host"
echo " "
exit(1)
endif
set TMP = .tmp
touch $TMP
(echo "open $Src" ; \
echo "user $LogID $Passwd" ; \
echo "prompt" ; \
echo "bin" ; \
echo "cd $SrcDir" ; \
echo "ls" ; \
echo "quit" ) | ftp -n | grep pact >>& $TMP
set Try = `grep pact.README $TMP`
if ("$Try" != "") then
echo "The PACT README file is there"
endif
set Try = `egrep '.*pact.*-src' $TMP`
if ("$Try" != "") then
echo "The PACT distribution is there"
endif
set Try = `egrep '.*pact.*-doc.tar.gz' $TMP`
if ("$Try" != "") then
echo "The PACT documentation is there"
endif
rm $TMP
exit($status)
|