forked from litespeedtech/openlitespeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlmaxminddb.sh
executable file
·35 lines (28 loc) · 926 Bytes
/
dlmaxminddb.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
#! /bin/sh
cd `dirname "$0"`
CURDIR=`pwd`
echo "Checking libmaxminddb ..."
VERSION=1.3.2
URL=https://github.com/maxmind/libmaxminddb/archive/$VERSION.tar.gz
if [ ! -f "libmaxminddb/src/.libs/libmaxminddb.a" ] ; then
echo -e "\033[38;5;148mDownloading libmaxminddb version $VERSION and building, it will take several minutes ...\033[39m"
wget --no-check-certificate -O mmdb.tgz $URL
tar xf mmdb.tgz
mv libmaxminddb-$VERSION ../libmaxminddb
cd ../libmaxminddb
./bootstrap
./configure --disable-tests
make
if [ ! -f "src/.libs/libmaxminddb.a" ] ; then
echo -e "\033[38;5;148mError: failed to make libmaxminddb library.\033[39m"
exit 1
else
echo -e "\033[38;5;148mGood, libmaxminddb made.\033[39m"
cd ..
mv libmaxminddb $CURDIR/
exit 0
fi
else
echo -e "\033[38;5;148mlibmaxminddb library exist.\033[39m"
exit 0
fi