File: distcheck

package info (click to toggle)
discover 2.1.2-7.1+deb9u1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 6,248 kB
  • sloc: sh: 8,115; ansic: 7,275; xml: 1,809; makefile: 732
file content (44 lines) | stat: -rwxr-xr-x 644 bytes parent folder | download | duplicates (7)
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
#! /bin/sh

# $Progeny$

# This program is in the public domain.

# Too bad we don't have something like sysexits.h for POSIX sh...
EX_USAGE=64

usage ()
{
    cat <<EOF
usage: $0 DISTNAME

Where DISTNAME.tar.bz2 contains the DISTNAME directory.
EOF
}

if [ $# -ne 1 ]; then
    usage
    exit ${EX_USAGE}
fi

distdir=$1
distfile=${distdir}.tar.bz2

set -e

bzip2 -dc ${distfile} | tar -xf -

abs_distdir=$(cd ${distdir} && pwd)

mkdir ${distdir}/.buildtest
cd ${distdir}/.buildtest
../configure
make check

make install DESTDIR=${abs_distdir}/.installtest
make uninstall DESTDIR=${abs_distdir}/.installtest

cd ../..
rm -rf ${distdir}

exit 0