File: GenericRdist

package info (click to toggle)
lsof 4.99.4%2Bdfsg-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,924 kB
  • sloc: ansic: 50,680; sh: 8,351; makefile: 1,194; perl: 940; awk: 214
file content (80 lines) | stat: -rwxr-xr-x 2,208 bytes parent folder | download
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
#!/bin/ksh
#
# GenericRdist -- generically 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
cat > $R << .DISTFILE
. -> $H
	except ( ./00.README.FIRST ./00DCACHE ./00DIST ./00FAQ );
	except ( ./00PORTING ./00README ./00CREDITS ./00QUICKSTART );
	except ( ./00LSOF-L ./00MANIFEST ./00XCONFIG ./.ck00MAN );
	except ( ./00TEST ./.neverCust ./.neverInv );
	except ( ./ChangeLog ./Makefile );
	except ( ./lsof ./lsof32 ./lsof64 ./lsof_old /lsof_32.old );
	except ( ./lsof_64.old ./Lsof.8 );
	except ( ./ddev.c ./dfile.c ./dlsof.h ./dmnt.c ./dnode.c ./dnode1.c );
	except ( ./dnode2.c ./dproc.c ./dproto.h ./dsock.c ./dstore.c );
	except ( ./kernelbase.h ./machine.h ./version.h ./zipme );
	except ( ./NEW ./OLD ./RCS ./dialects ./support ) ;
	except ( ./make.out ./new ./old ./out ./X ./xxx ./errs ) ;
	except ( ./lib/Makefile ./lib/RCS ./lib/OLD ./lib/NEW );
	except ( ./scripts/OLD ./scripts/NEW ./scripts/RCS );
	except ( ./scripts/00MANIFEST ./scripts/00README ) ;
	except ( ./tests/OLD ./tests/NEW ./tests/RCS );
	except ( ./tests/00README );
	except ( ./tests/LTbasic ./tests/LTbigf ./tests/LTdnlc );
	except ( ./tests/LTlock ./tests/LTnfs ./tests/LTnlink );
	except ( ./tests/LTsock ./tests/LTszoff ./tests/LTunix );
	except_pat ( \\.o\\$ \\.a\\$ ./tests/config\\. );
	install src/lsof4;

./dialects/$D -> $H
	except ( ./dialects/$D/NEW );
	except ( ./dialects/$D/OLD ./dialects/$D/RCS );
	install src/lsof4/dialects/$D ;
.DISTFILE

# Do the actual distribution.

(cd $HOME/src/lsof4; /usr/local/bin/rdist $SHP -f $R)
rm $R
echo done