File: inst

package info (click to toggle)
manpages-posix 2017a-2
  • links: PTS
  • area: non-free
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 9,440 kB
  • sloc: sh: 34; makefile: 20
file content (39 lines) | stat: -rw-r--r-- 776 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

set -e

install -d -m 755 debian/manpages-posix/usr/share/man/man1
install -d -m 755 debian/manpages-posix-dev/usr/share/man/man{3,7}

for i in man[013]p; do
	echo "-- Installing section ${i#man}:"
	case "${i#man}" in
		0p)
            osect="0"
			nsect="7"
			dpack="manpages-posix-dev"
		;;
		1p)
            osect="1"
			nsect="1"
			dpack="manpages-posix"
		;;
		3p)
            osect="3"
			nsect="3"
			dpack="manpages-posix-dev"
		;;
	esac

    dest=debian/$dpack/usr/share/man/man$nsect
	for j in $i/*.*; do
        b=${j##*/}
        echo -n $b
        b=${b%.${osect}p}.${nsect}posix
		install -p -m 644 $j $dest/$b
        sed -ri "s/(^\.TH .* )\"${osect}[pP]\"/\1\"${nsect}POSIX\"/" $dest/$b
		echo -n " "
	done
	gzip -n -9 $dest/*.?posix
	echo
done