forked from clicon/clixon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_install.sh
executable file
·62 lines (55 loc) · 1.42 KB
/
test_install.sh
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
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# Install system test
# Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
new "Set up installdir $dir"
new "Make DESTDIR install"
(cd ..; make DESTDIR=$dir install)
if [ $? -ne 0 ]; then
err
fi
new "Check installed files /usr"
if [ ! -d $dir/usr ]; then
err $dir/usr
fi
new "Check installed files /www-data"
if [ ! -d $dir/www-data ]; then
err $dir/www-data
fi
new "Check installed files clixon-config"
if [ ! -f $dir/usr/local/share/clixon/clixon-config* ]; then
err $dir/usr/local/share/clixon/clixon-config*
fi
new "Check installed files libclixon.so"
if [ ! -h $dir/usr/local/lib/libclixon.so ]; then
err $dir/usr/local/lib/libclixon.so
fi
new "Check installed files libclixon_backend.so"
if [ ! -h $dir/usr/local/lib/libclixon_backend.so ]; then
err $dir/usr/local/lib/libclixon_backend.so
fi
new "Make DESTDIR install include"
(cd ..; make DESTDIR=$dir install-include)
if [ $? -ne 0 ]; then
err
fi
new "Check installed includes"
if [ ! -f $dir/usr/local/include/clixon/clixon.h ]; then
err $dir/usr/local/include/clixon/clixon.h
fi
new "Make DESTDIR uninstall"
(cd ..; make DESTDIR=$dir uninstall)
if [ $? -ne 0 ]; then
err
fi
new "Check remaining files"
f=$(find $dir -type f)
if [ -n "$f" ]; then
err "$f"
fi
new "Check remaining symlinks"
l=$(find $dir -type l)
if [ -n "$l" ]; then
err "$l"
fi
rm -rf $dir