-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuesp-install-wikidiff2
executable file
·87 lines (68 loc) · 1.33 KB
/
uesp-install-wikidiff2
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/sh
./uesp-yuminstall "libthai"
./uesp-yuminstall "libthai-devel"
pushd wikidiff2
phpize
RESULT=$?
if [ $RESULT != 0 ]
then
echo " ERROR: 'make' failed to phpize WikiDiff2!"
popd
exit -1
fi
./configure
RESULT=$?
if [ $RESULT != 0 ]
then
echo " ERROR: 'make' failed to configure WikiDiff2!"
popd
exit -2
fi
make --quiet 2> /dev/null
RESULT=$?
if [ $RESULT != 0 ]
then
echo " ERROR: 'make' failed to make WikiDiff2!"
popd
exit -3
fi
make --quiet install 2> /dev/null
RESULT=$?
if [ $RESULT != 0 ]
then
echo " ERROR: 'make' failed to install WikiDiff2!"
popd
exit -4
fi
cp -f ./modules/wikidiff2.so /usr/lib64/php/modules/
RESULT=$?
if [ $RESULT != 0 ]
then
echo " ERROR: Failed to copy wikidiff2 module to module directory!"
popd
exit -5
fi
if [ ! -f /usr/lib64/php/modules/wikidiff2.so ]
then
echo " ERROR: Failed to install the WikiDiff2 PHP extension!"
popd
exit -6
fi
cp -f wikidiff2.ini /etc/php.d/
RESULT=$?
if [ $RESULT != 0 ] || [ ! -f /etc/php.d/wikidiff2.ini ]
then
echo " ERROR: Failed to copy file 'wikidiff2.ini' to '/etc/php.d/'!"
popd
exit -7
fi
RESULT=`php -m | grep -c -i 'wikidiff2'`
if [ $RESULT -eq 0 ]
then
echo " ERROR: The wikidiff2 PHP extension does show up in loaded modules!"
popd
exit -8
fi
echo " OK: WikiDiff2 PHP extension installed!"
popd
exit 0