summaryrefslogtreecommitdiff
path: root/tests/check-camera-list.sh.in
blob: 1e53e730486e404539f04f8220f7b0de3fb3fa7f (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
32
33
34
35
36
37
38
39
40
#!/bin/sh
# "make installcheck" testcase:
# Lists all cameras found by libgphoto2.
# Fails if no cameras are found.

set -e

debug=:
#debug=false

PACKAGE_TARNAME="${PACKAGE_TARNAME-"@PACKAGE_TARNAME@"}"
prefix="${prefix-"@prefix@"}"
exec_prefix="${exec_prefix-"@exec_prefix@"}"
libdir="${libdir-"@libdir@"}"
libexecdir="${libexecdir-"@libexecdir@"}"
camlibdir="${camlibdir-"@camlibdir@"}"
CAMLIBS="${DESTDIR}${camlibdir}"
export CAMLIBS
LD_LIBRARY_PATH="${DESTDIR}/${libdir}${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
export LD_LIBRARY_PATH


if test -d "${CAMLIBS}"; then :; else
    echo "camlibs directory '${CAMLIBS}' does not exist"
    exit 13
fi

if "$debug"; then
    echo "====================="
    pwd
    echo "camlibdir=$camlibdir"
    echo "libdir=$libdir"
    echo "DESTDIR=$DESTDIR"
    echo "CAMLIBS=$CAMLIBS"
    echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
    echo "#####################"
fi

set -x
./test-camera-list