File: pre-build

package info (click to toggle)
pcp 6.3.8-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 235,180 kB
  • sloc: ansic: 1,253,622; sh: 173,998; xml: 160,490; cpp: 83,331; python: 20,482; perl: 18,302; yacc: 6,886; makefile: 2,955; lex: 2,862; fortran: 60; java: 52
file content (34 lines) | stat: -rwxr-xr-x 609 bytes parent folder | download | duplicates (3)
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
#!/bin/sh
#
# Pre-build helper script
#
# 1. Generate control from control.pcp and the non-optional
#    control.foo fragments so that control can be included in the tarball
#    (for vanilla Debian builds that do not use ../Makepkgs).
#

tmp=/var/tmp/pre-build.$$
rm -f $tmp
status=1	# failure is the default
trap "rm -f $tmp; exit \$status" 0 1 2 3 15

for part in control.pcp
do
    if [ -f $part ]
    then
	sed <$part >>$tmp -e '/^Build-Depends:/{
s/?{//g
s/}/,/g
}'
    else
	echo "$0: Arrgh ... expect $part to exist ..."
	ls -l control*
	exit
    fi
done

rm -f control
cp $tmp control
status=0

exit