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
|
#!/bin/ksh
#
# SpecialRdist -- specially rdist lsof 4.x sources to a specified destination
#
# Usage: GenericRdist <destination> <dialect> <shell>
#
# <destination> destination host
#
# <dialect> dialect subdirectory name
#
# <shell> remote shell -- rsh or ssh
# Process arguments.
if test $# -ne 3
then
echo "Usage: <destination> <dialect> <shell>"
exit
fi
H=$1
D=$2
S=$3
# Test the shell and define its full path, as required.
if test "X$S" = "Xrsh"
then
SHP=""
else
if test "X$S" = "Xssh"
then
SHP="-P /opt/openssh/bin/ssh"
else
echo "$S is not an acceptable shell; specify rsh or ssh."
exit
fi
fi
# Define the distfile and make sure it's removed on premature exit.
R=/tmp/distfile.$$
trap 'rm $R; exit 1' 1 2 3 15
rm -f $R
echo ". -> $H" > $R
echo " except ( ./.ck00MAN );" >> $R
echo " except ( ./.neverCust ./.neverInv );" >> $R
echo " except ( ./Makefile ./ddev.c ./dfile.c ./dlsof.h ./dmnt.c );" >> $R
echo " except ( ./dnode.c ./dnode1.c ./dproc.c ./dproto.h ./dsock.c );" >> $R
echo " except ( ./dstore.c ./lib/Makefile ./lib/RCS ./lib/OLD ./lib/NEW );" >> $R
echo " except ( ./lsof ./machine.h ./version.h ./zipme );" >> $R
echo " except ( ./NEW ./OLD ./RCS ./dialects ./support ) ;" >> $R
echo " except ( ./new ./old ./X ./xxx ./errs ) ;" >> $R
echo " except ( ./scripts/OLD ./scripts/NEW ./scripts/RCS ) ;" >> $R
echo " except ( ./scripts/00MANIFEST ./scripts/00README ) ;" >> $R
echo " except ( ./tests/OLD ./tests/NEW ./tests/RCS ) ;" >> $R
echo " except ( ./tests/00README ) ;" >> $R
echo " except ( ./tests/LTbasic ./tests/LTbigf ./tests/LTdnlc ) ;" >> $R
echo " except ( ./tests/LTlock ./tests/LTnfs ./tests/LTnlink ) ;" >> $R
echo " except ( ./tests/LTsock ./tests/LTszoff ./tests/LTunix ) ;" >> $R
echo " except_pat ( \\\\./tests/config\\\\. );" >> $R
echo " except_pat ( \\\\.gz \\\\.o \\\\.a );" >> $R
echo " install src/lsof4 ;" >> $R
echo "" >> $R
echo "./dialects/$D -> $H" >> $R
echo " except ( ./dialects/$D/NEW );" >> $R
echo " except ( ./dialects/$D/OLD ./dialects/$D/RCS );" >> $R
echo " install src/lsof4/dialects/$D ;" >> $R
# Do the actual distribution.
(cd $HOME/src/lsof4; rdist $SHP -f $R)
rm $R
echo done
|