Debian Codegraph @

support/GenericRdist

raw
1 #!/bin/ksh
2 #
3 # GenericRdist -- generically rdist lsof 4.x sources to a specified destination
4 #
5 # Usage: GenericRdist <destination> <dialect> <shell>
6 #
7 # <destination> destination host
8 #
9 # <dialect> dialect subdirectory name
10 #
11 # <shell> remote shell -- rsh or ssh
12
13 # Process arguments.
14
15 if test $# -ne 3
16 then
17 echo "Usage: <destination> <dialect> <shell>"
18 exit
19 fi
20 H=$1
21 D=$2
22 S=$3
23
24 # Test the shell and define its full path, as required.
25
26 if test "X$S" = "Xrsh"
27 then
28 SHP=""
29 else
30 if test "X$S" = "Xssh"
31 then
32 SHP="-P /opt/openssh/bin/ssh"
33 else
34 echo "$S is not an acceptable shell; specify rsh or ssh."
35 exit
36 fi
37 fi
38
39 # Define the distfile and make sure it's removed on premature exit.
40
41 R=/tmp/distfile.$$
42 trap 'rm $R; exit 1' 1 2 3 15
43
44 rm -f $R
45 cat > $R << .DISTFILE
46 . -> $H
47 except ( ./00.README.FIRST ./00DCACHE ./00DIST ./00FAQ );
48 except ( ./00PORTING ./00README ./00CREDITS ./00QUICKSTART );
49 except ( ./00LSOF-L ./00MANIFEST ./00XCONFIG ./.ck00MAN );
50 except ( ./00TEST ./.neverCust ./.neverInv );
51 except ( ./ChangeLog ./Makefile );
52 except ( ./lsof ./lsof32 ./lsof64 ./lsof_old /lsof_32.old );
53 except ( ./lsof_64.old ./Lsof.8 );
54 except ( ./ddev.c ./dfile.c ./dlsof.h ./dmnt.c ./dnode.c ./dnode1.c );
55 except ( ./dnode2.c ./dproc.c ./dproto.h ./dsock.c ./dstore.c );
56 except ( ./kernelbase.h ./machine.h ./version.h ./zipme );
57 except ( ./NEW ./OLD ./RCS ./dialects ./support ) ;
58 except ( ./make.out ./new ./old ./out ./X ./xxx ./errs ) ;
59 except ( ./lib/Makefile ./lib/RCS ./lib/OLD ./lib/NEW );
60 except ( ./scripts/OLD ./scripts/NEW ./scripts/RCS );
61 except ( ./scripts/00MANIFEST ./scripts/00README ) ;
62 except ( ./tests/OLD ./tests/NEW ./tests/RCS );
63 except ( ./tests/00README );
64 except ( ./tests/LTbasic ./tests/LTbigf ./tests/LTdnlc );
65 except ( ./tests/LTlock ./tests/LTnfs ./tests/LTnlink );
66 except ( ./tests/LTsock ./tests/LTszoff ./tests/LTunix );
67 except_pat ( \\.o\\$ \\.a\\$ ./tests/config\\. );
68 install src/lsof4;
69
70 ./dialects/$D -> $H
71 except ( ./dialects/$D/NEW );
72 except ( ./dialects/$D/OLD ./dialects/$D/RCS );
73 install src/lsof4/dialects/$D ;
74 .DISTFILE
75
76 # Do the actual distribution.
77
78 (cd $HOME/src/lsof4; /usr/local/bin/rdist $SHP -f $R)
79 rm $R
80 echo done