summaryrefslogtreecommitdiff
path: root/packaging/Solaris/pkg-specs/mkprototype
blob: 5ca0746beea0688ab750e0ad23155dbcd09fab9f (plain)
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
#!/bin/sh
# this creates prototype files
pkgproto * > prototype
nawk 'BEGIN { print "# d   directory"
	print "# e   a file to be edited upon installation or removal"
	print "# f   a standard executable or data file"
	print "# i   installation script or information file"
	print "# l   linked file"
	print "# s   symbolic link"
	print "# v   volatile file (one whose contents are expected to
change)"
	print "#" }
/ pkginfo /	{ print "i pkginfo" ; next }
/ postinstall /	{ print "i postinstall" ; next }
/ postremove /	{ print "i postremove" ; next }
/d none usr /	{ print "d none usr ? ? ?" ; next }
/d none usr\/local /	{ print "d none usr/local ? ? ?" ; next }
/d none etc /	{ print "d none etc ? ? ?" ; next }
/f none etc\//	{ $1 = "v" }
/d none opt /	{ print "d none opt ? ? ?" ; next }
/d none var /	{ print "d none var ? ? ?" ; next }
/none prototype / { next }
/none mkprototype / { next }
/ src[ \/]/ { next }
/^[dfv]/ { $5 = "bin"
	$6 = "bin"
	print
	next }
{ print }' prototype >/tmp/prototype.$$
mv /tmp/prototype.$$ prototype