File: setup-executables

package info (click to toggle)
pcp 7.1.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 252,748 kB
  • sloc: ansic: 1,483,656; sh: 182,366; xml: 160,462; cpp: 83,813; python: 24,980; perl: 18,327; yacc: 6,877; lex: 2,864; makefile: 2,738; awk: 165; fortran: 60; java: 52
file content (51 lines) | stat: -rwxr-xr-x 1,273 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
#
# Very ugly picker for executables from a build.
#
# Problem is that /var/lib/pcp/testsuite/qa is populated from the
# packaging, but in a build context the qmc headers are defined in
# ../../src/libpcp_qmc/src but the qmc library and the standard
# PCP headers are not in ../../src they are out in the build area
# c/o Makepkgs
#

if [ -z "$PCP_DIR" ]
then
    . /etc/pcp.env
else
    . "$PCP_DIR"/etc/pcp.env
fi

# Don't bother if we're not building libraries that depend on Qt
#
if [ -f ../../src/include/builddefs ]
then
    eval `sed -n -e '/^ENABLE_QT[ 	]*=/s/[ 	]//gp' ../../src/include/builddefs`
    [ "$ENABLE_QT" = false ] && exit 0
elif [ -f $PCP_INC_DIR/builddefs ]
then
    eval `sed -n -e '/^ENABLE_QT[ 	]*=/s/[ 	]//gp' $PCP_INC_DIR/builddefs`
    [ "$ENABLE_QT" = false ] && exit 0
fi

builddir=''
for builddir in ../../build/deb/pcp-$PCP_VERSION/qa/qt $PCP_VAR_DIR/testsuite/qt ''
do
    [ -n "$builddir" -a -d "$builddir" ] && break
done

for x in qmc_*
do
    [ -x $x/$x ] && continue
    $PCP_ECHO_PROG $PCP_ECHO_N "Hunting for $x executable ... $PCP_ECHO_C"
    if [ -z "$builddir" ]
    then
	echo "no build dir, not found"
    elif [ -x $builddir/$x/$x ]
    then
	cp $builddir/$x/$x $x/$x
	echo OK
    else
	echo "not found"
    fi
done